Open kloczek opened 1 week ago
On top of that unit sill fails that unit which I've reported in https://github.com/pdm-project/pdm/issues/2015
pytest should not execute pip
to install or upgrade anything in test suite because pdm
it is not python modules management module but pep517 backend + pytest ext.
Here is pytest output with failing those two units:
RuntimeError: setuptools is required to convert setup.py, install it by `pdm add setuptools`
setuptools
is required for that case, you need to install it into /usr/bin/python
environment
@pytest.mark.usefixtures("local_finder") def test_build_with_no_isolation(pdm, project): result = pdm(["build", "--no-isolation"], obj=project) > assert result.exit_code == 1 E AssertionError: assert 0 == 1
While this is an error handling case to verify it should fail when build dependencies are not installed, but your test setup break this assumption, you may have to exclude this test yourself.
Steps to reproduce
I'm packaging your module as an rpm package so 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
build
with--no-isolation
I'm using during all processes only locally installed modulesinstaller
modulecut off from access to the public network
(pytest is executed with-m "not network"
)Actual behavior
Here is pytest output:
```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pdm-2.18.2-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pdm-2.18.2-2.fc37.x86_64/usr/lib/python3.10/site-packages + /usr/bin/pytest -ra -m 'not network' --deselect tests/test_project.py::test_access_index_with_auth --deselect tests/test_formats.py::test_convert_setup_py_project --deselect 'tests/test_project.py::test_create_venv_in_project[venv-True]' ============================= test session starts ============================== platform linux -- Python 3.10.14, pytest-8.2.2, pluggy-1.5.0 rootdir: /home/tkloczko/rpmbuild/BUILD/pdm-2.18.2 configfile: pyproject.toml testpaths: tests/ plugins: anyio-4.4.0, mock-3.14.0, pytest_httpserver-1.1.0, flaky-3.8.1 collected 947 items / 7 deselected / 940 selected tests/cli/test_add.py ................................. [ 3%] tests/cli/test_build.py ..........F. [ 4%] tests/cli/test_cache.py ............ [ 6%] tests/cli/test_config.py .................. [ 7%] tests/cli/test_fix.py ..... [ 8%] tests/cli/test_hooks.py ................................................ [ 13%] ........................................... [ 18%] tests/cli/test_init.py .......... [ 19%] tests/cli/test_install.py .............................................. [ 24%] ......... [ 25%] tests/cli/test_list.py ............................... [ 28%] tests/cli/test_lock.py .............................................. [ 33%] tests/cli/test_others.py ...................... [ 35%] tests/cli/test_outdated.py . [ 35%] tests/cli/test_publish.py ............ [ 37%] tests/cli/test_python.py ........ [ 37%] tests/cli/test_remove.py ............. [ 39%] tests/cli/test_run.py .................................................. [ 44%] .............. [ 46%] tests/cli/test_self_command.py ........ [ 46%] tests/cli/test_template.py .... [ 47%] tests/cli/test_update.py ..................... [ 49%] tests/cli/test_use.py ....... [ 50%] tests/cli/test_utils.py . [ 50%] tests/cli/test_venv.py ............................... [ 53%] tests/models/test_backends.py ........... [ 54%] tests/models/test_candidates.py ................................. [ 58%] tests/models/test_marker.py ................... [ 60%] tests/models/test_requirements.py .................... [ 62%] tests/models/test_setup_parsing.py .......... [ 63%] tests/models/test_specifiers.py ........................................ [ 67%] .. [ 68%] tests/models/test_versions.py ................... [ 70%] tests/resolver/test_resolve.py .................................... [ 73%] tests/test_formats.py ................ [ 75%] tests/test_installer.py .................................. [ 79%] tests/test_integration.py . [ 79%] tests/test_plugin.py ..... [ 79%] tests/test_project.py .................................................. [ 85%] .......... [ 86%] tests/test_signals.py .. [ 86%] tests/test_utils.py ...............................s.................... [ 92%] ........................................................................ [ 99%] ... [100%] =================================== FAILURES =================================== _________________________ test_build_with_no_isolation _________________________ pdm =Expected behavior
pytest should not fail.
Environment Information