pdb + expect tests failing in Python 3.7
Link to a failing build:
https://github.com/pytest-dev/pytest/runs/6860982658
FAILED testing/test_debugging.py::TestPDB::test_pdb_interaction_capturing_simple - pexpect.exceptions.TIMEOUT: Timeout exceeded.
FAILED testing/test_debugging.py::TestPDB::test_pdb_interaction_capturing_twice - pexpect.exceptions.TIMEOUT: Timeout exceeded.
FAILED testing/test_debugging.py::TestPDB::test_pdb_with_injected_do_debug - assert False
FAILED testing/test_debugging.py::TestDebuggingBreakpoints::test_pdb_not_altered - pexpect.exceptions.TIMEOUT: Timeout exceeded.
FAILED testing/test_debugging.py::test_pdb_suspends_fixture_capturing[capfd] - assert 'out_inner' not in ') c\r\n\r\n...========\r\n'
FAILED testing/test_debugging.py::test_pdb_suspends_fixture_capturing[capsys] - assert 'out_inner' not in ') c\r\n\r\n...========\r\n'
Marking those tests as xfail so they get out of the way for now, but the cause of the errors should be investigated eventually.
Tests marked as xfail in #10043.
At least the first two failing tests could be related to https://github.com/nedbat/coveragepy/issues/1402. You could verify it by running the tests with coverage<=6.4.0.
The tests do not fail for me on Python 3.11.0:
=================================== FAILURES ===================================
________________ TestDebuggingBreakpoints.test_pdb_not_altered _________________
[gw4] linux -- Python 3.11.0 /usr/bin/python3
[XPASS(strict)] #10042
_________________ TestPDB.test_pdb_interaction_capturing_twice _________________
[gw5] linux -- Python 3.11.0 /usr/bin/python3
[XPASS(strict)] #10042
________________ TestPDB.test_pdb_interaction_capturing_simple _________________
[gw2] linux -- Python 3.11.0 /usr/bin/python3
[XPASS(strict)] #10042
___________________ TestPDB.test_pdb_with_injected_do_debug ____________________
[gw5] linux -- Python 3.11.0 /usr/bin/python3
[XPASS(strict)] #10042
__________________ test_pdb_suspends_fixture_capturing[capfd] __________________
[gw0] linux -- Python 3.11.0 /usr/bin/python3
[XPASS(strict)] #10042
_________________ test_pdb_suspends_fixture_capturing[capsys] __________________
[gw0] linux -- Python 3.11.0 /usr/bin/python3
[XPASS(strict)] #10042
=========================== short test summary info ============================
hence they probably should be conditional and/or marked as not strict.
I tried updating pytest on Solaris to 7.1.3 and I am hitting this issue with each runtime we have (3.7, 3.9 and 3.11); sometimes all of them unexpectedly pass, sometimes only some of them (not sure what causes these differences).
But it might be cause by executing tests differently? I am doing so with pytest test_debugging.py in the testing directory.