python-pytest-cases
python-pytest-cases copied to clipboard
fix: Allow loading cases for tests.py
Hi, i noticed that after updating to 3.8.5 this package stopped loading cases from tests_cases.py.
This PR fixes it.
Can this be accepted? Or it's better for me to rename my tests.py to test_something.py?
@smarie Please, review this.
Hi @last-partizan , I looked at your PR and slightly improved it.
Now my problem is that the test does not seem to run at all :)
Could it be that this correspond to an old behaviour from pytest ? Maybe pytest does not run anymore a collected file that is named tests.py .
Yes. It seems to be the case.
By default, files matching test_*.py and *_test.py will be considered test modules.
I think pytest never collected tests.py by default, but I have this configured in pytest.ini
python_files = tests.py test_*.py *_tests.py