jaraco / pytest-perf

MIT License
3 stars 2 forks source link

Exercises not run if `.` not on sys.path #11

Closed jaraco closed 7 months ago

jaraco commented 7 months ago

This project includes exercises.py, but those performance tests aren't run if . is not on sys.path, which is the case when the tests are run using simply pytest, which is the current method for running the tests.

If on the other hand, the tests are run with python -m pytest, then . is on sys.path, and the exercises are run.

This unexpected behavior also provides some insight as to why the modules need to appear at the root (placing modules for exercises other than at the root would cause them not to run).

The module discovery/loading mechanism needs a bit of an overhaul to address these issues.