$ pycodestyle --version
2.11.1
$ which pycodestyle
/home/fox/tmp/pycodestyle-2.11.1/venv/bin/pycodestyle
- Tests with `pytest` fail (as described in [CONTRIBUTING.rst](https://github.com/PyCQA/pycodestyle/blob/main/CONTRIBUTING.rst)
$ pytest tests
__ ERROR collecting tests/test_E101.py _____
ImportError while importing test module '/home/fox/tmp/pycodestyle-2.11.1/tests/test_E101.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.10/importlib/init.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_E101.py:5: in
from testing.support import errors_from_src
E ModuleNotFoundError: No module named 'testing'
__ ERROR collecting tests/test_E901.py ___
ImportError while importing test module '/home/fox/tmp/pycodestyle-2.11.1/tests/test_E901.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.10/importlib/init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_E901.py:5: in
from testing.support import errors_from_src
E ModuleNotFoundError: No module named 'testing'
(...)
These errors are due to the fact that the **directory `testing` in not included** in sources bundle downloaded from PyPI repository.
When I try to test
pycodestyle
v2.11.1 with sources from PyPI, tests withpytest
fail.Steps to reproduce issue
Download sources for
pycodestyle
v2.11.1 from PyPI : https://files.pythonhosted.org/packages/34/8f/fa09ae2acc737b9507b5734a9aec9a2b35fa73409982f57db1b42f8c3c65/pycodestyle-2.11.1.tar.gzCreate virtualenv:
Install
pycodestyle
v2.11.1 andpytest
7.4.3$ pycodestyle --version 2.11.1 $ which pycodestyle /home/fox/tmp/pycodestyle-2.11.1/venv/bin/pycodestyle
$ pytest tests __ ERROR collecting tests/test_E101.py _____ ImportError while importing test module '/home/fox/tmp/pycodestyle-2.11.1/tests/test_E101.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/local/lib/python3.10/importlib/init.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests/test_E101.py:5: in
from testing.support import errors_from_src
E ModuleNotFoundError: No module named 'testing'
__ ERROR collecting tests/test_E901.py ___
ImportError while importing test module '/home/fox/tmp/pycodestyle-2.11.1/tests/test_E901.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.10/importlib/ init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_E901.py:5: in
from testing.support import errors_from_src
E ModuleNotFoundError: No module named 'testing'
(...)