Closed kloczek closed 7 months ago
I only support running the tests with the tox setup in the repo. Any other attempt to run the tests is not guaranteed.
OK will add note in my spec to not bother you anymore about pytest issues.
Is it any particular reason what it fails in case of not using tox
? 🤔
I'm asking because on scale +12k already packaged modules I cannot find to much examples of pytest vs. tox (generally 99% works with pytest) so still cannot recognise possible causes of such differences😞
PS I'm trying to use pytest
in as many packaged modules as I can because I can preriom additional test by altering pytest params and list of additional pytest extensions and tox
perform all tests in static set of modules.
Just tested using tox and look like it fails for me as well (other way but fails)
Python Version
3.9.18
pytest Version
8.1.1
Package Version
3.15.0
Description
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"
)Here is pytest output:
```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-randomly-3.15.0-2.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-randomly-3.15.0-2.fc36.x86_64/usr/lib/python3.9/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0 Using --randomly-seed=722815198 rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-randomly-3.15.0 configfile: pyproject.toml plugins: pytest_randomly-3.15.0, Faker-24.2.0, forked-1.6.0, xdist-3.5.0 collected 37 items tests/test_pytest_randomly.py ..F.......F........................F. [100%] =================================== FAILURES =================================== __________________________ test_entrypoint_injection ___________________________ pytester =List of installed modules in build env:
```console Package Version ------------------ ----------- build 1.1.1 distro 1.9.0 dnf 4.19.0 exceptiongroup 1.1.3 execnet 2.0.2 factory_boy 3.3.0 Faker 24.2.0 gpg 1.23.2 importlib_metadata 7.0.1 iniconfig 2.0.0 installer 0.7.0 libdnf 0.73.0 numpy 1.26.5 packaging 24.0 pluggy 1.4.0 py 1.11.0 pyproject_hooks 1.0.0 pytest 8.1.1 pytest-forked 1.6.0 pytest-xdist 3.5.0 python-dateutil 2.9.0.post0 setuptools 69.1.1 tomli 2.0.1 wheel 0.43.0 zipp 3.17.0 ```Please let me know if you need more details or want me to perform some diagnostics.