Fedora Account System
Red Hat Associate
Red Hat Customer
python-pytest-xdist fails to build with pytest 8. =================================== FAILURES =================================== _________________ TestLoadScope.test_workqueue_ordered_by_size _________________ self = <acceptance_test.TestLoadScope object at 0x7f2d537297c0> pytester = <Pytester PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_workqueue_ordered_by_size0')> def test_workqueue_ordered_by_size(self, pytester: pytest.Pytester) -> None: test_file = """ import pytest @pytest.mark.parametrize('i', range({})) def test(i): pass """ pytester.makepyfile(test_a=test_file.format(10), test_b=test_file.format(20)) result = pytester.runpytest("-n2", "--dist=loadscope", "-v") > assert get_workers_and_test_count_by_prefix( "test_a.py::test", result.outlines ) == {"gw1": 10} E AssertionError: assert {'gw0': 10} == {'gw1': 10} E E Left contains 1 more item: E {'gw0': 10} E Right contains 1 more item: E {'gw1': 10} E Use -v to get more diff /builddir/build/BUILD/pytest-xdist-3.5.0/testing/acceptance_test.py:1244: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0 -- /usr/bin/python3 cachedir: .pytest_cache rootdir: /tmp/pytest-of-mockbuild/pytest-0/test_workqueue_ordered_by_size0 plugins: xdist-3.5.0 created: 2/2 workers 2 workers [30 items] scheduling tests via LoadScopeScheduling test_b.py::test[0] [gw1] [ 3%] PASSED test_b.py::test[0] test_b.py::test[1] test_a.py::test[0] [gw0] [ 6%] PASSED test_a.py::test[0] test_a.py::test[1] [gw1] [ 10%] PASSED test_b.py::test[1] test_b.py::test[2] [gw1] [ 13%] PASSED test_b.py::test[2] test_b.py::test[3] [gw1] [ 16%] PASSED test_b.py::test[3] [gw0] [ 20%] PASSED test_a.py::test[1] test_a.py::test[2] [gw0] [ 23%] PASSED test_a.py::test[2] test_a.py::test[3] [gw0] [ 26%] PASSED test_a.py::test[3] test_a.py::test[4] test_b.py::test[4] [gw1] [ 30%] PASSED test_b.py::test[4] test_b.py::test[5] [gw0] [ 33%] PASSED test_a.py::test[4] test_a.py::test[5] [gw0] [ 36%] PASSED test_a.py::test[5] test_a.py::test[6] [gw0] [ 40%] PASSED test_a.py::test[6] [gw1] [ 43%] PASSED test_b.py::test[5] test_b.py::test[6] [gw1] [ 46%] PASSED test_b.py::test[6] test_b.py::test[7] [gw1] [ 50%] PASSED test_b.py::test[7] test_b.py::test[8] [gw1] [ 53%] PASSED test_b.py::test[8] test_b.py::test[9] [gw1] [ 56%] PASSED test_b.py::test[9] test_b.py::test[10] [gw1] [ 60%] PASSED test_b.py::test[10] test_b.py::test[11] [gw1] [ 63%] PASSED test_b.py::test[11] test_b.py::test[12] [gw1] [ 66%] PASSED test_b.py::test[12] test_b.py::test[13] [gw1] [ 70%] PASSED test_b.py::test[13] test_b.py::test[14] [gw1] [ 73%] PASSED test_b.py::test[14] test_b.py::test[15] [gw1] [ 76%] PASSED test_b.py::test[15] test_b.py::test[16] [gw1] [ 80%] PASSED test_b.py::test[16] test_b.py::test[17] [gw1] [ 83%] PASSED test_b.py::test[17] test_b.py::test[18] [gw1] [ 86%] PASSED test_b.py::test[18] test_b.py::test[19] [gw1] [ 90%] PASSED test_b.py::test[19] test_a.py::test[7] [gw0] [ 93%] PASSED test_a.py::test[7] test_a.py::test[8] [gw0] [ 96%] PASSED test_a.py::test[8] test_a.py::test[9] [gw0] [100%] PASSED test_a.py::test[9] ============================== 30 passed in 0.34s ============================== ================================== XFAILURES =================================== _____________________ TestDistEach.test_simple_diffoutput ______________________ cls = <class '_pytest.runner.CallInfo'> func = <function call_and_report.<locals>.<lambda> at 0x7f2d52d302c0> when = 'setup' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.12/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/runner.py:240: in <lambda> lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise /usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) /usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield /usr/lib/python3.12/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") /usr/lib/python3.12/site-packages/_pytest/logging.py:832: in _runtest_for yield /usr/lib/python3.12/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) /usr/lib/python3.12/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.12/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <Function test_simple_diffoutput> @hookimpl(tryfirst=True) def pytest_runtest_setup(item: Item) -> None: skipped = evaluate_skip_marks(item) if skipped: raise skip.Exception(skipped.reason, _use_item_location=True) item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item) if xfailed and not item.config.option.runxfail and not xfailed.run: > xfail("[NOTRUN] " + xfailed.reason) E _pytest.outcomes.XFailed: [NOTRUN] other python versions might not have pytest installed /usr/lib/python3.12/site-packages/_pytest/skipping.py:243: XFailed ________________________ test_terminate_on_hangingnode _________________________ pytester = <Pytester PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_terminate_on_hangingnode0')> @pytest.mark.xfail def test_terminate_on_hangingnode(pytester: pytest.Pytester) -> None: p = pytester.makeconftest( """ def pytest_sessionfinish(session): if session.nodeid == "my": # running on worker import time time.sleep(3) """ ) result = pytester.runpytest(p, "--dist=each", "--tx=popen//id=my") assert result.duration < 2.0 > result.stdout.fnmatch_lines(["*killed*my*"]) E Failed: nomatch: '*killed*my*' E and: '============================= test session starts ==============================' E and: 'platform linux -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0' E and: 'rootdir: /tmp/pytest-of-mockbuild/pytest-0/test_terminate_on_hangingnode0' E and: 'plugins: xdist-3.5.0' E and: 'created: 1/1 worker' E and: '1 worker [0 items]' E and: '' E and: '' E and: '============================ no tests ran in 0.21s =============================' E remains unmatched: '*killed*my*' /builddir/build/BUILD/pytest-xdist-3.5.0/testing/acceptance_test.py:529: Failed ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0 rootdir: /tmp/pytest-of-mockbuild/pytest-0/test_terminate_on_hangingnode0 plugins: xdist-3.5.0 created: 1/1 worker 1 worker [0 items] ============================ no tests ran in 0.21s ============================= ______________________________ test_session_hooks ______________________________ cls = <class '_pytest.runner.CallInfo'> func = <function call_and_report.<locals>.<lambda> at 0x7f2d509ab380> when = 'setup' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.12/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/runner.py:240: in <lambda> lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise /usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) /usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield /usr/lib/python3.12/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") /usr/lib/python3.12/site-packages/_pytest/logging.py:832: in _runtest_for yield /usr/lib/python3.12/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) /usr/lib/python3.12/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.12/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <Function test_session_hooks> @hookimpl(tryfirst=True) def pytest_runtest_setup(item: Item) -> None: skipped = evaluate_skip_marks(item) if skipped: raise skip.Exception(skipped.reason, _use_item_location=True) item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item) if xfailed and not item.config.option.runxfail and not xfailed.run: > xfail("[NOTRUN] " + xfailed.reason) E _pytest.outcomes.XFailed: [NOTRUN] works if run outside test suite /usr/lib/python3.12/site-packages/_pytest/skipping.py:243: XFailed ______________________ TestNodeFailure.test_each_multiple ______________________ self = <acceptance_test.TestNodeFailure object at 0x7f2d5372be00> pytester = <Pytester PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_each_multiple0')> @pytest.mark.xfail(reason="#20: xdist race condition on node restart") def test_each_multiple(self, pytester: pytest.Pytester) -> None: f = pytester.makepyfile( """ import os def test_a(): os._exit(1) def test_b(): pass """ ) res = pytester.runpytest(f, "--dist=each", "--tx=2*popen") > res.stdout.fnmatch_lines( [ "*Replacing crashed worker*", "*Worker*crashed while running*", "*2 failed*2 passed*", ] ) E Failed: nomatch: '*Replacing crashed worker*' E and: '============================= test session starts ==============================' E and: 'platform linux -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0' E and: 'rootdir: /tmp/pytest-of-mockbuild/pytest-0/test_each_multiple0' E and: 'plugins: xdist-3.5.0' E and: 'created: 2/2 workers' E and: '2 workers [2 items]' E and: '' E and: '[gw1] node down: Not properly terminated' E and: 'F' E and: 'replacing crashed worker gw1' E and: '[gw0] node down: Not properly terminated' E and: 'F' E and: 'replacing crashed worker gw0' E and: '..' E and: '=================================== FAILURES ===================================' E and: '____________________________ test_each_multiple.py _____________________________' E and: '[gw1] linux -- Python 3.12.2 /usr/bin/python3' E and: "worker 'gw1' crashed while running 'test_each_multiple.py::test_a'" E and: '____________________________ test_each_multiple.py _____________________________' E and: '[gw0] linux -- Python 3.12.2 /usr/bin/python3' E and: "worker 'gw0' crashed while running 'test_each_multiple.py::test_a'" E and: '=========================== short test summary info ============================' E and: 'FAILED test_each_multiple.py::test_a' E and: 'FAILED test_each_multiple.py::test_a' E and: '========================= 2 failed, 2 passed in 0.48s ==========================' E remains unmatched: '*Replacing crashed worker*' /builddir/build/BUILD/pytest-xdist-3.5.0/testing/acceptance_test.py:971: Failed ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0 rootdir: /tmp/pytest-of-mockbuild/pytest-0/test_each_multiple0 plugins: xdist-3.5.0 created: 2/2 workers 2 workers [2 items] [gw1] node down: Not properly terminated F replacing crashed worker gw1 [gw0] node down: Not properly terminated F replacing crashed worker gw0 .. =================================== FAILURES =================================== ____________________________ test_each_multiple.py _____________________________ [gw1] linux -- Python 3.12.2 /usr/bin/python3 worker 'gw1' crashed while running 'test_each_multiple.py::test_a' ____________________________ test_each_multiple.py _____________________________ [gw0] linux -- Python 3.12.2 /usr/bin/python3 worker 'gw0' crashed while running 'test_each_multiple.py::test_a' =========================== short test summary info ============================ FAILED test_each_multiple.py::test_a FAILED test_each_multiple.py::test_a ========================= 2 failed, 2 passed in 0.48s ========================== _____________________ TestDistReporter.test_rsync_printing _____________________ self = <test_dsession.TestDistReporter object at 0x7f2d53755f70> pytester = <Pytester PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_rsync_printing0')> linecomp = <_pytest.pytester.LineComp object at 0x7f2d507ef9e0> @pytest.mark.xfail def test_rsync_printing(self, pytester: pytest.Pytester, linecomp) -> None: config = pytester.parseconfig() > from _pytest.pytest_terminal import TerminalReporter E ModuleNotFoundError: No module named '_pytest.pytest_terminal' /builddir/build/BUILD/pytest-xdist-3.5.0/testing/test_dsession.py:445: ModuleNotFoundError _____________________________ test_pytest_issue419 _____________________________ pytester = <Pytester PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_pytest_issue4190')> @pytest.mark.xfail(reason="duplicate test ids not supported yet") def test_pytest_issue419(pytester: pytest.Pytester) -> None: pytester.makepyfile( """ import pytest @pytest.mark.parametrize('birth_year', [1988, 1988, ]) def test_2011_table(birth_year): pass """ ) reprec = pytester.inline_run("-n1") reprec.assertoutcome(passed=2) > assert 0 E assert 0 /builddir/build/BUILD/pytest-xdist-3.5.0/testing/test_dsession.py:535: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0 rootdir: /tmp/pytest-of-mockbuild/pytest-0/test_pytest_issue4190 plugins: xdist-3.5.0 created: 1/1 worker 1 worker [2 items] .. [100%] ============================== 2 passed in 0.20s =============================== ________________ TestLooponFailing.test_looponfail_removed_test ________________ self = <test_looponfail.TestLooponFailing object at 0x7f2d52e1cbc0> pytester = <Pytester PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_looponfail_removed_test0')> @pytest.mark.xfail(reason="broken by pytest 3.1+", strict=True) def test_looponfail_removed_test(self, pytester: pytest.Pytester) -> None: modcol = pytester.getmodulecol( textwrap.dedent( """ def test_one(): assert 0 def test_two(): assert 0 """ ) ) remotecontrol = RemoteControl(modcol.config) remotecontrol.loop_once() assert len(remotecontrol.failures) == 2 modcol.path.write_text( textwrap.dedent( """ def test_xxx(): # renamed test assert 0 def test_two(): assert 1 # pass now """ ) ) removepyc(modcol.path) remotecontrol.loop_once() > assert len(remotecontrol.failures) == 0 E AssertionError: assert 1 == 0 E + where 1 = len(['test_looponfail_removed_test.py::test_xxx']) E + where ['test_looponfail_removed_test.py::test_xxx'] = <xdist.looponfail.RemoteControl object at 0x7f2d5309ebd0>.failures /builddir/build/BUILD/pytest-xdist-3.5.0/testing/test_looponfail.py:288: AssertionError ----------------------------- Captured stdout call ----------------------------- ============================= test session starts ============================== platform linux -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0 rootdir: /tmp/pytest-of-mockbuild/pytest-0/test_looponfail_removed_test0 plugins: xdist-3.5.0 collected 0 items ============================ no tests ran in 0.00s ============================= ============================= test session starts ============================== platform linux -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0 rootdir: /tmp/pytest-of-mockbuild/pytest-0/test_looponfail_removed_test0 plugins: xdist-3.5.0 collected 2 items collected 2 items test_looponfail_removed_test.py FF [100%] =================================== FAILURES =================================== ___________________________________ test_one ___________________________________ def test_one(): > assert 0 E assert 0 test_looponfail_removed_test.py:2: AssertionError ___________________________________ test_two ___________________________________ def test_two(): > assert 0 E assert 0 test_looponfail_removed_test.py:4: AssertionError =========================== short test summary info ============================ FAILED test_looponfail_removed_test.py::test_one - assert 0 FAILED test_looponfail_removed_test.py::test_two - assert 0 ============================== 2 failed in 0.02s =============================== ============================= test session starts ============================== platform linux -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0 rootdir: /tmp/pytest-of-mockbuild/pytest-0/test_looponfail_removed_test0 plugins: xdist-3.5.0 collected 1 item collected 3 items collected 3 items test_looponfail_removed_test.py F. [100%] =================================== FAILURES =================================== ___________________________________ test_xxx ___________________________________ def test_xxx(): # renamed test > assert 0 E assert 0 test_looponfail_removed_test.py:3: AssertionError =========================== short test summary info ============================ FAILED test_looponfail_removed_test.py::test_xxx - assert 0 ========================= 1 failed, 1 passed in 0.02s ========================== ____________________________ test_remoteinitconfig _____________________________ pytester = <Pytester PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_remoteinitconfig0')> @pytest.mark.xfail(reason="#59") def test_remoteinitconfig(pytester: pytest.Pytester) -> None: from xdist.remote import remote_initconfig config1 = pytester.parseconfig() config2 = remote_initconfig(config1.option.__dict__, config1.args) > assert config2.option.__dict__ == config1.option.__dict__ E AssertionError: assert {'assertmode'...w': None, ...} == {'assertmode'...w': None, ...} E E Omitting 92 identical items, use -vv to show E Differing items: E {'file_or_dir': ['/tmp/pytest-of-mockbuild/pytest-0/test_remoteinitconfig0']} != {'file_or_dir': []} E Use -v to get more diff /builddir/build/BUILD/pytest-xdist-3.5.0/testing/test_remote.py:79: AssertionError _____________ TestWorkerInteractor.test_happy_run_events_converted _____________ self = <test_remote.TestWorkerInteractor object at 0x7f2d52e1e1b0> pytester = <Pytester PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_happy_run_events_converted0')> worker = <test_remote.WorkerSetup object at 0x7f2d5367d250> def test_happy_run_events_converted( self, pytester: pytest.Pytester, worker: WorkerSetup ) -> None: > pytest.xfail("implement a simple test for event production") E _pytest.outcomes.XFailed: implement a simple test for event production /builddir/build/BUILD/pytest-xdist-3.5.0/testing/test_remote.py:187: XFailed __________________ TestNodeManager.test_rsync_roots_no_roots ___________________ cls = <class '_pytest.runner.CallInfo'> func = <function call_and_report.<locals>.<lambda> at 0x7f2d50a7b420> when = 'setup' reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.12/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/runner.py:240: in <lambda> lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise /usr/lib/python3.12/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) /usr/lib/python3.12/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.12/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield /usr/lib/python3.12/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") /usr/lib/python3.12/site-packages/_pytest/logging.py:832: in _runtest_for yield /usr/lib/python3.12/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) /usr/lib/python3.12/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.12/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <Function test_rsync_roots_no_roots> @hookimpl(tryfirst=True) def pytest_runtest_setup(item: Item) -> None: skipped = evaluate_skip_marks(item) if skipped: raise skip.Exception(skipped.reason, _use_item_location=True) item.stash[xfailed_key] = xfailed = evaluate_xfail_marks(item) if xfailed and not item.config.option.runxfail and not xfailed.run: > xfail("[NOTRUN] " + xfailed.reason) E _pytest.outcomes.XFailed: [NOTRUN] /usr/lib/python3.12/site-packages/_pytest/skipping.py:243: XFailed _____________________ test_unserialize_warning_msg[Nested] _____________________ w_cls = 'Nested' @pytest.mark.parametrize( "w_cls", [ UserWarning, MyWarning, "Imported", pytest.param( "Nested", marks=pytest.mark.xfail(reason="Nested warning classes are not supported."), ), ], ) def test_unserialize_warning_msg(w_cls): """Test that warning serialization process works well""" # Create a test warning message with pytest.warns(UserWarning) as w: if not isinstance(w_cls, str): warnings.warn("hello", w_cls) elif w_cls == "Imported": generate_warning() elif w_cls == "Nested": # dynamic creation class MyWarning2(UserWarning): pass warnings.warn("hello", MyWarning2) # Unpack assert len(w) == 1 w_msg = w[0] # Serialize and deserialize data = serialize_warning_message(w_msg) > w_msg2 = unserialize_warning_message(data) testing/test_workermanage.py:369: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ data = {'category_class_name': 'MyWarning2', 'category_module': 'test_workermanage', 'file': None, 'filename': '/builddir/build/BUILD/pytest-xdist-3.5.0/testing/test_workermanage.py', ...} def unserialize_warning_message(data): import warnings import importlib if data["message_module"]: mod = importlib.import_module(data["message_module"]) > cls = getattr(mod, data["message_class_name"]) E AttributeError: module 'test_workermanage' has no attribute 'MyWarning2'. Did you mean: 'MyWarning'? ../../BUILDROOT/python-pytest-xdist-3.5.0-3.fc41.x86_64/usr/lib/python3.12/site-packages/xdist/workermanage.py:417: AttributeError =========================== short test summary info ============================ SKIPPED [3] ../../../../usr/lib/python3.12/site-packages/_pytest/pytester.py:1522: could not import 'pexpect': No module named 'pexpect' SKIPPED [1] testing/acceptance_test.py:809: pytest 8.1.1 does not have the pytest_warning_captured hook. SKIPPED [1] testing/test_workermanage.py:316: no 'gspecs' option found XFAIL testing/acceptance_test.py::TestDistEach::test_simple_diffoutput - reason: [NOTRUN] other python versions might not have pytest installed XFAIL testing/acceptance_test.py::test_terminate_on_hangingnode XFAIL testing/acceptance_test.py::test_session_hooks - reason: [NOTRUN] works if run outside test suite XFAIL testing/acceptance_test.py::TestNodeFailure::test_each_multiple - #20: xdist race condition on node restart XFAIL testing/test_dsession.py::TestDistReporter::test_rsync_printing XFAIL testing/test_dsession.py::test_pytest_issue419 - duplicate test ids not supported yet XFAIL testing/test_looponfail.py::TestLooponFailing::test_looponfail_removed_test - broken by pytest 3.1+ XFAIL testing/test_remote.py::test_remoteinitconfig - #59 XFAIL testing/test_remote.py::TestWorkerInteractor::test_happy_run_events_converted - reason: implement a simple test for event production XFAIL testing/test_workermanage.py::TestNodeManager::test_rsync_roots_no_roots - reason: [NOTRUN] XFAIL testing/test_workermanage.py::test_unserialize_warning_msg[Nested] - Nested warning classes are not supported. FAILED testing/acceptance_test.py::TestLoadScope::test_workqueue_ordered_by_size ============ 1 failed, 187 passed, 5 skipped, 11 xfailed in 44.45s ============= https://docs.pytest.org/en/stable/changelog.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07248744-python-pytest-xdist/ For all our attempts to build python-pytest-xdist with pytest 8, see: https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/package/python-pytest-xdist/ Let us know here if you have any questions. Pytest 8 is planned to be included in Fedora 41. And this bugzilla is a heads up before we merge new pytest into rawhide. For more info see a Fedora Change proposal https://fedoraproject.org/wiki/Changes/Pytest_8 We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
I've got a successful build in COPR with pytest 8. Sorry for the noise. https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/build/7319976/