Test runner should exclude __pycache__ directories
|Reported by:||Ian Clelland||Owned by:||nobody|
|Severity:||Normal||Keywords:||Testing Python3 pycache|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Beginning with Python 3.2, the Python runtime now stores .pyc files in a subdirectory named
__pycache__, rather than alongside their counterpart .py sources. These directories are created automatically any time that the code is imported in a Python3.2+ environment.
The test runner needs to explicitly ignore those directories when searching for tests, as it does with hidden files and directories, init.py files, and dirs named 'sql'. Currently, the full (auto-discovered) test suite will not run after tests have been run with Python 3.
This may have implications for other auto discovery mechanisms as well.
Change History (6)
comment:1 Changed 5 years ago by
|Patch needs improvement:||unset|