[BUG] 60.5.4: pytest is failing in few units
See original GitHub issuesetuptools version
60.5.4
Python version
3.8.12
OS
Linux/x86_64
Additional environment information
Full list of modules installed in build env:
Package Version
----------------------------- -------------------
alabaster 0.7.12
attrs 21.4.0
Babel 2.9.1
build 0.7.0
chardet 4.0.0
charset-normalizer 2.0.10
coverage 6.2
cycler 0.11.0
dbus-python 1.2.18
distlib 0.3.4
distro 1.6.0
docutils 0.17.1
execnet 1.9.0
extras 1.0.0
filelock 3.4.2
fixtures 3.0.0
flake8 4.0.1
fonttools 4.28.5
gpg 1.16.0-unknown
idna 3.3
imagesize 1.3.0
importlib-metadata 4.10.1
iniconfig 1.1.1
jaraco.envs 2.2.0
jaraco.packaging 8.2.1
jaraco.path 3.3.1
Jinja2 3.0.3
jupyter-packaging-test-foo 0.1
kiwisolver 1.3.2
libcomps 0.1.18
lit 13.0.0
lxml 4.7.1
MarkupSafe 2.0.1
matplotlib 3.5.1
mccabe 0.6.1
meson 0.60.3
mock 4.0.3
mypy 0.931
mypy-extensions 0.4.3
numpy 1.22.0
olefile 0.46
packaging 21.3
path 16.3.0
pbr 5.8.0
pep517 0.12.0
Pillow 9.0.0
pip 21.3.1
platformdirs 2.4.1
pluggy 1.0.0
py 1.11.0
pycairo 1.20.1
pycodestyle 2.8.0
pyflakes 2.4.0
Pygments 2.11.2
PyGObject 3.42.0
pyparsing 3.0.6
pytest 6.2.5
pytest-checkdocs 2.7.1
pytest-cov 3.0.0
pytest-fixture-config 1.7.0
pytest-flake8 1.0.7
pytest-forked 1.4.0
pytest-shutil 1.7.0
pytest-virtualenv 1.7.0
pytest-xdist 2.5.0
python-dateutil 2.8.2
pytz 2021.3
requests 2.27.1
rpm 4.17.0
rst 0.1
rst.linker 2.2.0
setuptools 60.1.0.post20211225
six 1.16.0
snowballstemmer 2.2.0
Sphinx 4.3.2.dev20220106
sphinx-favicon 0.2
sphinx_inline_tabs 2021.8.17b10
sphinxcontrib-applehelp 1.0.2.dev20220108
sphinxcontrib-devhelp 1.0.2.dev20220108
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1.dev20220108
sphinxcontrib-qthelp 1.0.3.dev20220108
sphinxcontrib-serializinghtml 1.1.5
termcolor 1.1.0
testtools 2.5.0
toml 0.10.2
tomli 2.0.0
tox 3.24.4
typing_extensions 4.0.1
urllib3 1.26.8
virtualenv 20.13.0
wheel 0.37.1
zipp 3.7.0
Description
Duting iupgrade from 60.1.0 to the latest 60.5.4 found that pytest is failing.
Expected behavior
pytest should not fail.
How to Reproduce
I’m using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
- because I’m calling
build
with--no-isolation
I’m using during all processes oly locally installed modules - install .whl file in </install/prefix>
- run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
Because I’v been adwised in https://github.com/pypa/setuptools/issues/2638#issuecomment-998049030 I’m running pytest with -W ignore::DeprecationWarning
Output
Summary pytest output without ignore :
========================================================================= short test summary info ==========================================================================
SKIPPED [2] setuptools/tests/test_msvc.py:17: could not import 'distutils.msvc9compiler': No module named 'winreg'
SKIPPED [1] setuptools/tests/test_develop.py:66: TODO: needs a fixture to cause 'develop' to be invoked without mutating environment.
SKIPPED [1] setuptools/tests/test_install_scripts.py:50: Windows only
SKIPPED [1] setuptools/tests/test_install_scripts.py:78: Windows only
SKIPPED [5] setuptools/tests/test_integration.py:31: Integration tests cannot run when pbr is installed
SKIPPED [1] setuptools/tests/test_msvc14.py:16: These tests are only for win32
SKIPPED [1] setuptools/tests/test_msvc14.py:34: These tests are only for win32
SKIPPED [1] setuptools/tests/test_msvc14.py:52: These tests are only for win32
SKIPPED [1] setuptools/tests/test_msvc14.py:68: These tests are only for win32
SKIPPED [1] setuptools/tests/test_windows_wrappers.py:80: Windows only
SKIPPED [1] setuptools/tests/test_windows_wrappers.py:121: Windows only
SKIPPED [1] setuptools/tests/test_windows_wrappers.py:180: Windows only
SKIPPED [8] conftest.py:49: skipping integration tests
XFAIL setuptools/tests/test_bdist_egg.py::Test::test_exclude_source_files
Byte code disabled
XFAIL setuptools/tests/test_dist.py::test_read_metadata[Metadata Version 1.2: Project-Url-attrs5]
Issue #1578: project_urls not read
XFAIL setuptools/tests/test_dist.py::test_read_metadata[Metadata Version 2.1: Provides Extra-attrs9]
provides_extras not read
XFAIL setuptools/tests/test_egg_info.py::TestEggInfo::test_requires[extras_require_with_marker_in_setup_cfg]
XFAIL setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[pip<20]
pypa/pip#6599
XFAIL setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[https://github.com/pypa/pip/archive/main.zip]
#2975
XPASS setuptools/tests/test_archive_util.py::test_unicode_files #710 and #712
FAILED setuptools/tests/test_develop.py::TestNamespaces::test_editable_prefix - subprocess.CalledProcessError: Command '[PosixPath('/tmp/pytest-of-tkloczko/pytest-17/tes...
FAILED setuptools/tests/test_dist.py::test_dist_fetch_build_egg - DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major ...
FAILED setuptools/tests/test_distutils_adoption.py::test_distutils_local_with_setuptools - subprocess.CalledProcessError: Command '[Path('/tmp/pytest-of-tkloczko/pytest-...
FAILED setuptools/tests/test_distutils_adoption.py::test_distutils_local - AssertionError: assert '.env' in ['', 'usr', 'lib64', 'python3.8', 'distutils', '__init__.py\n']
FAILED setuptools/tests/test_easy_install.py::TestEasyInstallTest::test_no_find_links - DeprecationWarning: Creating a LegacyVersion has been deprecated and will be remo...
FAILED setuptools/tests/test_easy_install.py::TestEasyInstallTest::test_unicode_filename_in_sdist - DeprecationWarning: Creating a LegacyVersion has been deprecated and ...
FAILED setuptools/tests/test_easy_install.py::TestEasyInstallTest::test_unicode_content_in_sdist - DeprecationWarning: Creating a LegacyVersion has been deprecated and w...
FAILED setuptools/tests/test_easy_install.py::TestEasyInstallTest::test_script_install - DeprecationWarning: Creating a LegacyVersion has been deprecated and will be rem...
FAILED setuptools/tests/test_easy_install.py::TestUserInstallTest::test_user_install_not_implied_user_site_enabled - DeprecationWarning: Creating a LegacyVersion has bee...
FAILED setuptools/tests/test_easy_install.py::TestUserInstallTest::test_user_install_not_implied_user_site_disabled - DeprecationWarning: Creating a LegacyVersion has be...
FAILED setuptools/tests/test_easy_install.py::TestUserInstallTest::test_local_index - DeprecationWarning: Creating a LegacyVersion has been deprecated and will be remove...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_overrides_version_conflict[use_setup_cfg0] - DeprecationWarning: Creating a LegacyVe...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_overrides_version_conflict[use_setup_cfg1] - DeprecationWarning: Creating a LegacyVe...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_overrides_version_conflict[use_setup_cfg2] - DeprecationWarning: Creating a LegacyVe...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_overrides_version_conflict[use_setup_cfg3] - DeprecationWarning: Creating a LegacyVe...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_override_nspkg[use_setup_cfg0] - DeprecationWarning: Creating a LegacyVersion has be...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_override_nspkg[use_setup_cfg1] - DeprecationWarning: Creating a LegacyVersion has be...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_override_nspkg[use_setup_cfg2] - DeprecationWarning: Creating a LegacyVersion has be...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_override_nspkg[use_setup_cfg3] - DeprecationWarning: Creating a LegacyVersion has be...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_attr_version[use_setup_cfg0] - DeprecationWarning: Creating a LegacyVersion has...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_attr_version[use_setup_cfg1] - DeprecationWarning: Creating a LegacyVersion has...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_attr_version[use_setup_cfg2] - DeprecationWarning: Creating a LegacyVersion has...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_attr_version[use_setup_cfg3] - DeprecationWarning: Creating a LegacyVersion has...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_honors_pip_env - DeprecationWarning: Creating a LegacyVersion has been deprecated an...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_pep508_url - DeprecationWarning: Creating a LegacyVersion has been deprecated a...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_allow_hosts - DeprecationWarning: Creating a LegacyVersion has been deprecated ...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_python_requires - DeprecationWarning: Creating a LegacyVersion has been depreca...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_find_links_in_setup_cfg[False] - DeprecationWarning: Creating a LegacyVersion h...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_find_links_in_setup_cfg[True] - DeprecationWarning: Creating a LegacyVersion ha...
FAILED setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_transitive_extra_dependency - DeprecationWarning: Creating a LegacyVersion has ...
FAILED setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[None] - Failed: DID NOT RAISE <class 'subprocess.CalledProcessError'>
FAILED setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[pip<20.1] - Failed: DID NOT RAISE <class 'subprocess.CalledProcessError'>
FAILED setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[pip<21] - Failed: DID NOT RAISE <class 'subprocess.CalledProcessError'>
FAILED setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[pip<22] - Failed: DID NOT RAISE <class 'subprocess.CalledProcessError'>
FAILED setuptools/tests/test_virtualenv.py::test_test_command_install_requirements - subprocess.CalledProcessError: Command '[Path('/tmp/pytest-of-tkloczko/pytest-17/tes...
=============================================== 35 failed, 532 passed, 25 skipped, 6 xfailed, 1 xpassed in 219.07s (0:03:39) ===============================================
second with ignore DeprecationWarning.
========================================================================= short test summary info ==========================================================================
SKIPPED [2] setuptools/tests/test_msvc.py:17: could not import 'distutils.msvc9compiler': No module named 'winreg'
SKIPPED [1] setuptools/tests/test_develop.py:66: TODO: needs a fixture to cause 'develop' to be invoked without mutating environment.
SKIPPED [1] setuptools/tests/test_install_scripts.py:50: Windows only
SKIPPED [1] setuptools/tests/test_install_scripts.py:78: Windows only
SKIPPED [5] setuptools/tests/test_integration.py:31: Integration tests cannot run when pbr is installed
SKIPPED [1] setuptools/tests/test_msvc14.py:16: These tests are only for win32
SKIPPED [1] setuptools/tests/test_msvc14.py:34: These tests are only for win32
SKIPPED [1] setuptools/tests/test_msvc14.py:52: These tests are only for win32
SKIPPED [1] setuptools/tests/test_msvc14.py:68: These tests are only for win32
SKIPPED [1] setuptools/tests/test_windows_wrappers.py:80: Windows only
SKIPPED [1] setuptools/tests/test_windows_wrappers.py:121: Windows only
SKIPPED [1] setuptools/tests/test_windows_wrappers.py:180: Windows only
SKIPPED [8] conftest.py:49: skipping integration tests
XFAIL setuptools/tests/test_bdist_egg.py::Test::test_exclude_source_files
Byte code disabled
XFAIL setuptools/tests/test_dist.py::test_read_metadata[Metadata Version 1.2: Project-Url-attrs5]
Issue #1578: project_urls not read
XFAIL setuptools/tests/test_dist.py::test_read_metadata[Metadata Version 2.1: Provides Extra-attrs9]
provides_extras not read
XFAIL setuptools/tests/test_egg_info.py::TestEggInfo::test_requires[extras_require_with_marker_in_setup_cfg]
XFAIL setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[pip<20]
pypa/pip#6599
XFAIL setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[https://github.com/pypa/pip/archive/main.zip]
#2975
XPASS setuptools/tests/test_archive_util.py::test_unicode_files #710 and #712
FAILED setuptools/tests/test_develop.py::TestNamespaces::test_editable_prefix - subprocess.CalledProcessError: Command '[PosixPath('/tmp/pytest-of-tkloczko/pytest-18/tes...
FAILED setuptools/tests/test_distutils_adoption.py::test_distutils_local_with_setuptools - subprocess.CalledProcessError: Command '[Path('/tmp/pytest-of-tkloczko/pytest-...
FAILED setuptools/tests/test_distutils_adoption.py::test_distutils_local - AssertionError: assert '.env' in ['', 'usr', 'lib64', 'python3.8', 'distutils', '__init__.py\n']
FAILED setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[None] - Failed: DID NOT RAISE <class 'subprocess.CalledProcessError'>
FAILED setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[pip<20.1] - Failed: DID NOT RAISE <class 'subprocess.CalledProcessError'>
FAILED setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[pip<21] - Failed: DID NOT RAISE <class 'subprocess.CalledProcessError'>
FAILED setuptools/tests/test_virtualenv.py::test_pip_upgrade_from_source[pip<22] - Failed: DID NOT RAISE <class 'subprocess.CalledProcessError'>
FAILED setuptools/tests/test_virtualenv.py::test_test_command_install_requirements - subprocess.CalledProcessError: Command '[Path('/tmp/pytest-of-tkloczko/pytest-18/tes...
=============================================== 8 failed, 559 passed, 25 skipped, 6 xfailed, 1 xpassed in 202.49s (0:03:22) ================================================
Full pytest output for both cses are attachments setuptools-60.5.4-pytest.txt setuptools-60.5.4-pytest-with-ignore-DeprecationWarning.txt
Code of Conduct
- I agree to follow the PSF Code of Conduct
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
How to handle test failures — pytest documentation
This will invoke the Python debugger on every failure (or KeyboardInterrupt). Often you might only want to do this for the first failing...
Read more >'pytest' exits with no error, but with "collected 0 items"
I wrote a unit test for this module (with a simple assert statement to check equality of lists) where I first instantiate the...
Read more >pytest.fail in a fixture and in a test | by George Shuklin - Medium
When you write a unit test, or some light-headed integration test, you generally has a good control over environment where this test is...
Read more >Pytest Unit Testing Tutorial • How to test your Python code
Learn how to test your Python code by writing unit tests with the Pytest framework.In this video I'll be covering how to write...
Read more >Testing Python in Visual Studio Code
Unit tests are then other pieces of code that specifically exercise the code unit with a ... Discovery failure error messaged displayed in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As Im using very simmilar %pytest rpm macro with what is used in Fedora looks l;ike that methodology which I’ve descriobed on top of this ticket goat of the #2318 goes in exactly the same direction. So yea … I agree with that 😄
Hi @kloczek, I believe that at this point we can say with confidence that the problems you are facing are the same ones described in #2318, and that the test mode you described is not currently supported by setuptools.
Since #2318 already exists and works as a request for implementing this feature, I will go ahead and close this issue as a duplicate.
You can subscribe to #2318 to receive updates if the feature you are after is implemented in setuptools.