Skip to content

pytest: Fix tests execution in development virtual environment

Since migration to PEP 517, executing make test or pytest in the root directory of the objstorage package triggers the following error:

ImportError: cannot import name 'add_filters' from 'swh.objstorage.multiplexer.filter'

Explicitly setting the testpaths option in pytest.ini and TEST_DIRS variable in Makefile.local to swh/objstorage/tests fix the issue.

See https://jenkins.softwareheritage.org/job/DENV/job/run-all-tests/1492/artifact/swh-objstorage.log

Merge request reports