Open Apteryks opened 2 years ago
Note: the same test failures are observed when using Pytest 5.3.5.
Try checking if disabling the hypothesis
plugin would fix this. We don't test with other plugins.
Here's the list of deps it didn't fail with: https://travis-ci.org/github/pytest-dev/pytest-forked/jobs/712323039#L244.
Also, verify you can reproduce this with the latest master. Note that currently there's no CI integrated (there was Travis but it got deprecated, disconnected, and never migrated).
Thanks for the answer!
Unfortunately, I don't much control over the presence of hypothesis
; it gets added to the environment as a result of the pytest
package in Guix which depends on it for tests, and unfortunately because of a Guix bug, this test dependency gets embedded in the PYTHONPATH set the generated wrapper script for the pytest
command script
However, I was able to test the build with a variant of the pytest package which comes with no dependency, and it worked!
./pre-inst-env guix build python-pytest-forked --with-input=python-pytest@6=python-pytest-bootstrap@6
[...]
starting phase `check'
============================= test session starts ==============================
platform linux -- Python 3.8.2, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /gnu/store/f8s95qc6dfhl0r45m70hczw5zip0xjxq-python-wrapper-3.8.2/bin/python
cachedir: .pytest_cache
rootdir: /tmp/guix-build-python-pytest-forked-1.3.0.drv-0/source, configfile: tox.ini
plugins: forked-1.3.0
collecting ... collected 10 items
testing/test_boxed.py::test_functional_boxed PASSED [ 10%]
testing/test_boxed.py::test_functional_boxed_per_test PASSED [ 20%]
testing/test_boxed.py::test_functional_boxed_capturing[no] PASSED [ 30%]
testing/test_boxed.py::test_functional_boxed_capturing[sys] XFAIL (c...) [ 40%]
testing/test_boxed.py::test_functional_boxed_capturing[fd] XFAIL (ca...) [ 50%]
testing/test_boxed.py::test_is_not_boxed_by_default PASSED [ 60%]
testing/test_xfail_behavior.py::test_xfail[strict xfail] PASSED [ 70%]
testing/test_xfail_behavior.py::test_xfail[strict xpass] PASSED [ 80%]
testing/test_xfail_behavior.py::test_xfail[non-strict xfail] PASSED [ 90%]
testing/test_xfail_behavior.py::test_xfail[non-strict xpass] PASSED [100%]
=========================== short test summary info ============================
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[sys]
capture cleanup needed
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[fd]
capture cleanup needed
========================= 8 passed, 2 xfailed in 0.36s =========================
[...]
So the problem is indeed that the test suite fails in the presence of the hypothesis
plugin.
Try adding -p no:hypothesis
, then.
So from your log it seems that plugins: forked*
does not match plugins: hypothesis-5.4.1, forked-1.1.3
. I think that disabling it or improving the match pattern should fix the tests.
Hmm, -p no:hypothesis
didn't work for me, perhaps because in Guix it's made available via PYTHONPATH, not sure:
test_xfail.py X [100%]
=========================== short test summary info ============================
XPASS test_xfail.py::test_function The process gets terminated
============================== 1 xpassed in 0.01s ==============================
=========================== short test summary info ============================
FAILED testing/test_xfail_behavior.py::test_xfail[strict xfail] - Failed: fnm...
FAILED testing/test_xfail_behavior.py::test_xfail[strict xpass] - Failed: fnm...
FAILED testing/test_xfail_behavior.py::test_xfail[non-strict xfail] - Failed:...
FAILED testing/test_xfail_behavior.py::test_xfail[non-strict xpass] - Failed:...
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[sys]
capture cleanup needed
XFAIL testing/test_boxed.py::test_functional_boxed_capturing[fd]
capture cleanup needed
==================== 4 failed, 4 passed, 2 xfailed in 0.43s ====================
command "pytest" "-vv" "-p" "no:hypothesis" failed with status 1
I think it's because it should be applied to the underlying invocation in tests.
Hi,
I'm trying to update this package to 1.3.0 on GNU Guix, but I'm encountering the following test failures:
The only direct dependency is pytest 6.2.4, but if you'd like to see the whole list of transitive dependencies used, here it is: