2.1.0: test suite is failing
See original GitHub issueJust one unit …
+ cd pytest-xdist-2.1.0
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-xdist-2.1.0-2.fc34.x86_64/usr/lib/python3.8/site-packages
+ pytest
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.3, pytest-6.1.1, py-1.9.0, pluggy-0.13.1
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/tkloczko/rpmbuild/BUILD/pytest-xdist-2.1.0/.hypothesis/examples')
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-xdist-2.1.0, configfile: tox.ini, testpaths: testing
plugins: xdist-2.1.0, hypothesis-4.23.8, flaky-3.6.1, forked-1.3.0
collected 161 items
testing/acceptance_test.py ..............s..x.......xx...............F.........x.................................... [ 55%]
testing/test_dsession.py ........x...x [ 63%]
testing/test_looponfail.py ...........x.ss [ 72%]
testing/test_newhooks.py .. [ 73%]
testing/test_plugin.py .............. [ 82%]
testing/test_remote.py x....x..... [ 89%]
testing/test_workermanage.py ........x.......s [100%]
================================================================================= FAILURES =================================================================================
________________________________________________________ TestWarnings.test_warning_captured_deprecated_in_pytest_6 _________________________________________________________
self = <acceptance_test.TestWarnings object at 0x7ff94759c4f0>, testdir = <Testdir local('/tmp/pytest-of-tkloczko/pytest-71/test_warning_captured_deprecated_in_pytest_60')>
def test_warning_captured_deprecated_in_pytest_6(self, testdir):
"""
Do not trigger the deprecated pytest_warning_captured hook in pytest 6+ (#562)
"""
import _pytest.hookspec
if not hasattr(_pytest.hookspec, "pytest_warning_recorded"):
pytest.skip("test requires pytest 6.0+")
testdir.makeconftest(
"""
def pytest_warning_captured():
assert False, "this hook should not be called in this version"
"""
)
testdir.makepyfile(
"""
import warnings
def test():
warnings.warn("custom warning")
"""
)
result = testdir.runpytest("-n1")
> result.stdout.fnmatch_lines(["* 1 passed in *"])
E Failed: remains unmatched: '* 1 passed in *'
/home/tkloczko/rpmbuild/BUILD/pytest-xdist-2.1.0/testing/acceptance_test.py:787: Failed
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/_pytest/pytester.py", line 1052, in runpytest_inprocess
reprec = self.inline_run(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/_pytest/pytester.py", line 1019, in inline_run
ret = pytest.main(list(args), plugins=plugins)
File "/usr/lib/python3.8/site-packages/_pytest/config/__init__.py", line 143, in main
config = _prepareconfig(args, plugins)
File "/usr/lib/python3.8/site-packages/_pytest/config/__init__.py", line 318, in _prepareconfig
config = pluginmanager.hook.pytest_cmdline_parse(
File "/usr/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 203, in _multicall
gen.send(outcome)
File "/usr/lib/python3.8/site-packages/_pytest/helpconfig.py", line 100, in pytest_cmdline_parse
config = outcome.get_result() # type: Config
File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/usr/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1003, in pytest_cmdline_parse
self.parse(args)
File "/usr/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1280, in parse
self._preparse(args, addopts=addopts)
File "/usr/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1186, in _preparse
self.hook.pytest_load_initial_conftests(
File "/usr/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 203, in _multicall
gen.send(outcome)
File "/usr/lib/python3.8/site-packages/_pytest/warnings.py", line 139, in pytest_load_initial_conftests
yield
File "/usr/lib64/python3.8/contextlib.py", line 120, in __exit__
next(self.gen)
File "/usr/lib/python3.8/site-packages/_pytest/warnings.py", line 64, in catch_warnings_for_item
ihook.pytest_warning_captured.call_historic(
File "/usr/lib/python3.8/site-packages/pluggy/hooks.py", line 308, in call_historic
res = self._hookexec(self, self.get_hookimpls(), kwargs)
File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/usr/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/usr/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/tmp/pytest-of-tkloczko/pytest-71/test_warning_captured_deprecated_in_pytest_60/conftest.py", line 2, in pytest_warning_captured
assert False, "this hook should not be called in this version"
AssertionError: this hook should not be called in this version
assert False
========================================================================= short test summary info ==========================================================================
SKIPPED [3] ../../../../../usr/lib/python3.8/site-packages/_pytest/pytester.py:1397: could not import 'pexpect': No module named 'pexpect'
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1470: no 'gspecs' option found
XFAIL testing/acceptance_test.py::TestDistEach::test_simple_diffoutput
reason: [NOTRUN] other python versions might not have py.test 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]
FAILED testing/acceptance_test.py::TestWarnings::test_warning_captured_deprecated_in_pytest_6 - Failed: remains unmatched: '* 1 passed in *'
===================================================== 1 failed, 146 passed, 4 skipped, 10 xfailed in 109.31s (0:01:49) =====================================================
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Test suite failed -- "version" is a required argument
since few weeks i struggel with an error i get when executing jest unit tests. "version" is a required argument. at Object.
Read more >Writing and running tests - Django documentation
This can lead to unit tests that pass when run in isolation but fail when run in a suite. Running tests¶. Once you've...
Read more >Allure Framework
There are two categories of defects by default: Product defects (failed tests). Test defects (broken tests). To create custom defects ...
Read more >Mocha - the fun, simple, flexible JavaScript test framework
For example, the following code will fail: describe('my suite', () => { ...
Read more >Unit testing C# with MSTest and .NET - Microsoft Learn
Learn unit test concepts in C# and . ... in the file with the following code to create a failing implementation of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
2.2.0
released. 🎉Any chance to make new release soon? 😛