* Package: dev-python/pytest-rerunfailures-10.2  * Repository: gentoo  * Maintainer: python@gentoo.org  * USE: alpha elibc_glibc kernel_linux python_targets_python3_9 test userland_GNU  * FEATURES: ccache network-sandbox preserve-libs sandbox test userpriv usersandbox >>> Unpacking source... >>> Unpacking pytest-rerunfailures-10.2.tar.gz to /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work >>> Source unpacked in /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work >>> Preparing source in /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2 ... * python3_9: running distutils-r1_run_phase distutils-r1_python_compile python3.9 setup.py build -j 3 running build running build_py copying pytest_rerunfailures.py -> /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2-python3_9/lib warning: build_py: byte-compiling is disabled, skipping. >>> Source compiled. >>> Test phase: dev-python/pytest-rerunfailures-10.2 * python3_9: running distutils-r1_run_phase python_test python3.9 -m pytest -vv -ra -l -Wdefault --color=yes =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.9 cachedir: .pytest_cache hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/.hypothesis/examples') rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collecting ... collected 63 items test_pytest_rerunfailures.py::test_error_when_run_with_pdb FAILED [ 1%] test_pytest_rerunfailures.py::test_no_rerun_on_pass PASSED [ 3%] test_pytest_rerunfailures.py::test_no_rerun_on_skipif_mark PASSED [ 4%] test_pytest_rerunfailures.py::test_no_rerun_on_skip_call PASSED [ 6%] test_pytest_rerunfailures.py::test_no_rerun_on_xfail_mark PASSED [ 7%] test_pytest_rerunfailures.py::test_no_rerun_on_xfail_call PASSED [ 9%] test_pytest_rerunfailures.py::test_no_rerun_on_xpass PASSED [ 11%] test_pytest_rerunfailures.py::test_rerun_fails_after_consistent_setup_failure FAILED [ 12%] test_pytest_rerunfailures.py::test_rerun_passes_after_temporary_setup_failure FAILED [ 14%] test_pytest_rerunfailures.py::test_rerun_fails_after_consistent_test_failure FAILED [ 15%] test_pytest_rerunfailures.py::test_rerun_passes_after_temporary_test_failure FAILED [ 17%] test_pytest_rerunfailures.py::test_rerun_passes_after_temporary_test_crash FAILED [ 19%] test_pytest_rerunfailures.py::test_rerun_passes_after_temporary_test_failure_with_flaky_mark FAILED [ 20%] test_pytest_rerunfailures.py::test_reruns_if_flaky_mark_is_called_without_options FAILED [ 22%] test_pytest_rerunfailures.py::test_reruns_if_flaky_mark_is_called_with_positional_argument FAILED [ 23%] test_pytest_rerunfailures.py::test_no_extra_test_summary_for_reruns_by_default FAILED [ 25%] test_pytest_rerunfailures.py::test_extra_test_summary_for_reruns FAILED [ 26%] test_pytest_rerunfailures.py::test_verbose FAILED [ 28%] test_pytest_rerunfailures.py::test_no_rerun_on_class_setup_error_without_reruns PASSED [ 30%] test_pytest_rerunfailures.py::test_rerun_on_class_setup_error_with_reruns FAILED [ 31%] test_pytest_rerunfailures.py::test_rerun_with_resultslog SKIPPED (--result-log removed in pytest>=6.1) [ 33%] test_pytest_rerunfailures.py::test_reruns_with_delay[-1] FAILED [ 34%] test_pytest_rerunfailures.py::test_reruns_with_delay[0] FAILED [ 36%] test_pytest_rerunfailures.py::test_reruns_with_delay[0.0] FAILED [ 38%] test_pytest_rerunfailures.py::test_reruns_with_delay[1] FAILED [ 39%] test_pytest_rerunfailures.py::test_reruns_with_delay[2.5] FAILED [ 41%] test_pytest_rerunfailures.py::test_reruns_with_delay_marker[-1] FAILED [ 42%] test_pytest_rerunfailures.py::test_reruns_with_delay_marker[0] FAILED [ 44%] test_pytest_rerunfailures.py::test_reruns_with_delay_marker[0.0] FAILED [ 46%] test_pytest_rerunfailures.py::test_reruns_with_delay_marker[1] FAILED [ 47%] test_pytest_rerunfailures.py::test_reruns_with_delay_marker[2.5] FAILED [ 49%] test_pytest_rerunfailures.py::test_rerun_on_setup_class_with_error_with_reruns FAILED [ 50%] test_pytest_rerunfailures.py::test_rerun_on_class_scope_fixture_with_error_with_reruns FAILED [ 52%] test_pytest_rerunfailures.py::test_rerun_on_module_fixture_with_reruns FAILED [ 53%] test_pytest_rerunfailures.py::test_rerun_on_session_fixture_with_reruns FAILED [ 55%] test_pytest_rerunfailures.py::test_execution_count_exposed FAILED [ 57%] test_pytest_rerunfailures.py::test_rerun_report FAILED [ 58%] test_pytest_rerunfailures.py::test_pytest_runtest_logfinish_is_called PASSED [ 60%] test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts0-True] FAILED [ 61%] test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts1-True] FAILED [ 63%] test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts2-True] FAILED [ 65%] test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts3-False] PASSED [ 66%] test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts4-True] FAILED [ 68%] test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts5-True] FAILED [ 69%] test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts6-True] FAILED [ 71%] test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts7-True] FAILED [ 73%] test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts8-False] PASSED [ 74%] test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts9-False] PASSED [ 76%] test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts10-True] FAILED [ 77%] test_pytest_rerunfailures.py::test_reruns_with_condition_marker[True-20] FAILED [ 79%] test_pytest_rerunfailures.py::test_reruns_with_condition_marker[False-00] FAILED [ 80%] test_pytest_rerunfailures.py::test_reruns_with_condition_marker[True-21] FAILED [ 82%] test_pytest_rerunfailures.py::test_reruns_with_condition_marker[False-01] FAILED [ 84%] test_pytest_rerunfailures.py::test_reruns_with_condition_marker[1-2] FAILED [ 85%] test_pytest_rerunfailures.py::test_reruns_with_condition_marker[0-0] FAILED [ 87%] test_pytest_rerunfailures.py::test_reruns_with_condition_marker[condition6-2] FAILED [ 88%] test_pytest_rerunfailures.py::test_reruns_with_condition_marker[condition7-0] FAILED [ 90%] test_pytest_rerunfailures.py::test_reruns_with_condition_marker[condition8-2] FAILED [ 92%] test_pytest_rerunfailures.py::test_reruns_with_condition_marker[condition9-0] FAILED [ 93%] test_pytest_rerunfailures.py::test_reruns_with_condition_marker[None-0] FAILED [ 95%] test_pytest_rerunfailures.py::test_reruns_with_string_condition[sys.platform.startswith("non-exists") == False-2] FAILED [ 96%] test_pytest_rerunfailures.py::test_reruns_with_string_condition[os.getpid() != -1-2] FAILED [ 98%] test_pytest_rerunfailures.py::test_reruns_with_string_condition_with_global_var FAILED [100%] ================================================================ FAILURES ================================================================= ______________________________________________________ test_error_when_run_with_pdb _______________________________________________________ testdir = def test_error_when_run_with_pdb(testdir): testdir.makepyfile("def test_pass(): pass") result = testdir.runpytest("--reruns", "1", "--pdb") > result.stderr.fnmatch_lines_random("ERROR: --reruns incompatible with --pdb") E Failed: line 'ERROR: --reruns incompatible with --pdb' not found in output result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:71: Failed ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_error_when_run_with_pdb0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_error_when_run_with_pdb.py . [100%] ============================================================ 1 passed in 0.17s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _____________________________________________ test_rerun_fails_after_consistent_setup_failure _____________________________________________ testdir = def test_rerun_fails_after_consistent_setup_failure(testdir): testdir.makepyfile("def test_pass(): pass") testdir.makeconftest( """  def pytest_runtest_setup(item):  raise Exception('Setup failure')""" ) result = testdir.runpytest("--reruns", "1") > assert_outcomes(result, passed=0, error=1, rerun=1) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:65: in assert_outcomes check_outcome_field(outcomes, "rerun", rerun) error = 1 failed = 0 field = 'errors' outcomes = {'errors': 1} passed = 0 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'rerun', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.rerun has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'rerun' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_fails_after_consistent_setup_failure0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_rerun_fails_after_consistent_setup_failure.py E [100%] ================================================================= ERRORS ================================================================== _______________________________________________________ ERROR at setup of test_pass _______________________________________________________ item = def pytest_runtest_setup(item): > raise Exception('Setup failure') E Exception: Setup failure conftest.py:2: Exception ========================================================= short test summary info ========================================================= ERROR test_rerun_fails_after_consistent_setup_failure.py::test_pass - Exception: Setup failure ============================================================ 1 error in 0.19s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _____________________________________________ test_rerun_passes_after_temporary_setup_failure _____________________________________________ testdir = def test_rerun_passes_after_temporary_setup_failure(testdir): testdir.makepyfile("def test_pass(): pass") testdir.makeconftest( f"""  def pytest_runtest_setup(item):  {temporary_failure()}""" ) result = testdir.runpytest("--reruns", "1", "-r", "R") > assert_outcomes(result, passed=1, rerun=1) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:165: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:58: in assert_outcomes check_outcome_field(outcomes, "passed", passed) error = 0 failed = 0 outcomes = {'errors': 1} passed = 1 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'passed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.passed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'passed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_passes_after_temporary_setup_failure0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_rerun_passes_after_temporary_setup_failure.py E [100%] ================================================================= ERRORS ================================================================== _______________________________________________________ ERROR at setup of test_pass _______________________________________________________ item = def pytest_runtest_setup(item): import py path = py.path.local(__file__).dirpath().ensure('test.res') count = path.read() or 1 if int(count) <= 1: path.write(int(count) + 1) > raise Exception('Failure: {0}'.format(count)) E Exception: Failure: 1 conftest.py:8: Exception ============================================================ 1 error in 0.19s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _____________________________________________ test_rerun_fails_after_consistent_test_failure ______________________________________________ testdir = def test_rerun_fails_after_consistent_test_failure(testdir): testdir.makepyfile("def test_fail(): assert False") result = testdir.runpytest("--reruns", "1") > assert_outcomes(result, passed=0, failed=1, rerun=1) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:171: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:65: in assert_outcomes check_outcome_field(outcomes, "rerun", rerun) error = 0 failed = 1 field = 'errors' outcomes = {'failed': 1} passed = 0 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'failed': 1}, field_name = 'rerun', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.rerun has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'rerun' field_value = 0 outcomes = {'failed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_fails_after_consistent_test_failure0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_rerun_fails_after_consistent_test_failure.py F [100%] ================================================================ FAILURES ================================================================= ________________________________________________________________ test_fail ________________________________________________________________ > def test_fail(): assert False E assert False test_rerun_fails_after_consistent_test_failure.py:1: AssertionError ========================================================= short test summary info ========================================================= FAILED test_rerun_fails_after_consistent_test_failure.py::test_fail - assert False ============================================================ 1 failed in 0.18s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _____________________________________________ test_rerun_passes_after_temporary_test_failure ______________________________________________ testdir = def test_rerun_passes_after_temporary_test_failure(testdir): testdir.makepyfile( f"""  def test_pass():  {temporary_failure()}""" ) result = testdir.runpytest("--reruns", "1", "-r", "R") > assert_outcomes(result, passed=1, rerun=1) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:181: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:58: in assert_outcomes check_outcome_field(outcomes, "passed", passed) error = 0 failed = 0 outcomes = {'failed': 1} passed = 1 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'failed': 1}, field_name = 'passed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.passed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'passed' field_value = 0 outcomes = {'failed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_passes_after_temporary_test_failure0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_rerun_passes_after_temporary_test_failure.py F [100%] ================================================================ FAILURES ================================================================= ________________________________________________________________ test_pass ________________________________________________________________ def test_pass(): import py path = py.path.local(__file__).dirpath().ensure('test.res') count = path.read() or 1 if int(count) <= 1: path.write(int(count) + 1) > raise Exception('Failure: {0}'.format(count)) E Exception: Failure: 1 test_rerun_passes_after_temporary_test_failure.py:8: Exception ============================================================ 1 failed in 0.19s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ______________________________________________ test_rerun_passes_after_temporary_test_crash _______________________________________________ testdir = @pytest.mark.skipif(not has_xdist, reason="requires xdist with crashitem") def test_rerun_passes_after_temporary_test_crash(testdir): # note: we need two tests because there is a bug where xdist # cannot rerun the last test if it crashes. the bug exists only # in xdist is there is no error that causes the bug in this plugin. testdir.makepyfile( f"""  def test_crash():  {temporary_crash()}   def test_pass():  pass""" ) result = testdir.runpytest("-n", "1", "--reruns", "1", "-r", "R") > assert_outcomes(result, passed=2, rerun=1) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:198: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:58: in assert_outcomes check_outcome_field(outcomes, "passed", passed) error = 0 failed = 0 outcomes = {'failed': 1, 'passed': 1} passed = 2 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'failed': 1, 'passed': 1}, field_name = 'passed', expected_value = 2 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.passed has unexpected value. Expected '2' but got '1' E assert 1 == 2 E +1 E -2 expected_value = 2 field_name = 'passed' field_value = 1 outcomes = {'failed': 1, 'passed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_passes_after_temporary_test_crash0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 gw0 I gw0 [2] [gw0] node down: Not properly terminated F replacing crashed worker gw0 . ================================================================ FAILURES ================================================================= _____________________________________________ test_rerun_passes_after_temporary_test_crash.py _____________________________________________ [gw0] linux -- Python 3.9.9 /usr/bin/python3.9 worker 'gw0' crashed while running 'test_rerun_passes_after_temporary_test_crash.py::test_crash' ====================================================== 1 failed, 1 passed in 38.58s ======================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _____________________________________ test_rerun_passes_after_temporary_test_failure_with_flaky_mark ______________________________________ testdir = def test_rerun_passes_after_temporary_test_failure_with_flaky_mark(testdir): testdir.makepyfile( f"""  import pytest  @pytest.mark.flaky(reruns=2)  def test_pass():  {temporary_failure(2)}""" ) result = testdir.runpytest("-r", "R") > assert_outcomes(result, passed=1, rerun=2) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:58: in assert_outcomes check_outcome_field(outcomes, "passed", passed) error = 0 failed = 0 outcomes = {'errors': 1} passed = 1 rerun = 2 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'passed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.passed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'passed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_passes_after_temporary_test_failure_with_flaky_mark0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_rerun_passes_after_temporary_test_failure_with_flaky_mark.py E [100%] ================================================================= ERRORS ================================================================== _______________________________________________________ ERROR at setup of test_pass _______________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ============================================================ 1 error in 0.58s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ___________________________________________ test_reruns_if_flaky_mark_is_called_without_options ___________________________________________ testdir = def test_reruns_if_flaky_mark_is_called_without_options(testdir): testdir.makepyfile( f"""  import pytest  @pytest.mark.flaky()  def test_pass():  {temporary_failure(1)}""" ) result = testdir.runpytest("-r", "R") > assert_outcomes(result, passed=1, rerun=1) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:65: in assert_outcomes check_outcome_field(outcomes, "rerun", rerun) error = 0 failed = 0 field = 'errors' outcomes = {'passed': 1} passed = 1 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'passed': 1}, field_name = 'rerun', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.rerun has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'rerun' field_value = 0 outcomes = {'passed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_if_flaky_mark_is_called_without_options0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_if_flaky_mark_is_called_without_options.py [100%]. [100%] ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== ============================================================ 1 passed in 0.60s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ______________________________________ test_reruns_if_flaky_mark_is_called_with_positional_argument _______________________________________ testdir = def test_reruns_if_flaky_mark_is_called_with_positional_argument(testdir): testdir.makepyfile( f"""  import pytest  @pytest.mark.flaky(2)  def test_pass():  {temporary_failure(2)}""" ) result = testdir.runpytest("-r", "R") > assert_outcomes(result, passed=1, rerun=2) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:234: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:58: in assert_outcomes check_outcome_field(outcomes, "passed", passed) error = 0 failed = 0 outcomes = {'failed': 1} passed = 1 rerun = 2 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'failed': 1}, field_name = 'passed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.passed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'passed' field_value = 0 outcomes = {'failed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_if_flaky_mark_is_called_with_positional_argument0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_if_flaky_mark_is_called_with_positional_argument.py [100%]F [100%] ================================================================ FAILURES ================================================================= ________________________________________________________________ test_pass ________________________________________________________________ @pytest.mark.flaky(2) def test_pass(): import py path = py.path.local(__file__).dirpath().ensure('test.res') count = path.read() or 1 if int(count) <= 2: path.write(int(count) + 1) > raise Exception('Failure: {0}'.format(count)) E Exception: Failure: 2 test_reruns_if_flaky_mark_is_called_with_positional_argument.py:10: Exception ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ============================================================ 1 failed in 0.58s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ____________________________________________ test_no_extra_test_summary_for_reruns_by_default _____________________________________________ testdir = def test_no_extra_test_summary_for_reruns_by_default(testdir): testdir.makepyfile( f"""  def test_pass():  {temporary_failure()}""" ) result = testdir.runpytest("--reruns", "1") assert "RERUN" not in result.stdout.str() > assert "1 rerun" in result.stdout.str() E assert '1 rerun' in "=========================================================== test session starts =====================================...ytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'." E + where "=========================================================== test session starts =====================================...ytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'." = >() E + where > = <_pytest.pytester.LineMatcher object at 0x2003b906b80>.str E + where <_pytest.pytester.LineMatcher object at 0x2003b906b80> = .stdout result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:245: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_no_extra_test_summary_for_reruns_by_default0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_no_extra_test_summary_for_reruns_by_default.py F [100%] ================================================================ FAILURES ================================================================= ________________________________________________________________ test_pass ________________________________________________________________ def test_pass(): import py path = py.path.local(__file__).dirpath().ensure('test.res') count = path.read() or 1 if int(count) <= 1: path.write(int(count) + 1) > raise Exception('Failure: {0}'.format(count)) E Exception: Failure: 1 test_no_extra_test_summary_for_reruns_by_default.py:8: Exception ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_no_extra_test_summary_for_reruns_by_default.py::test_pass - Exception: Failure: 1 ============================================================ 1 failed in 0.52s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ___________________________________________________ test_extra_test_summary_for_reruns ____________________________________________________ testdir = def test_extra_test_summary_for_reruns(testdir): testdir.makepyfile( f"""  def test_pass():  {temporary_failure()}""" ) result = testdir.runpytest("--reruns", "1", "-r", "R") > result.stdout.fnmatch_lines_random(["RERUN test_*:*"]) E Failed: line 'RERUN test_*:*' not found in output result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:255: Failed ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_extra_test_summary_for_reruns0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_extra_test_summary_for_reruns.py F [100%] ================================================================ FAILURES ================================================================= ________________________________________________________________ test_pass ________________________________________________________________ def test_pass(): import py path = py.path.local(__file__).dirpath().ensure('test.res') count = path.read() or 1 if int(count) <= 1: path.write(int(count) + 1) > raise Exception('Failure: {0}'.format(count)) E Exception: Failure: 1 test_extra_test_summary_for_reruns.py:8: Exception ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ============================================================ 1 failed in 0.53s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ______________________________________________________________ test_verbose _______________________________________________________________ testdir = def test_verbose(testdir): testdir.makepyfile( f"""  def test_pass():  {temporary_failure()}""" ) result = testdir.runpytest("--reruns", "1", "-v") > result.stdout.fnmatch_lines_random(["test_*:* RERUN*"]) E Failed: line 'test_*:* RERUN*' not found in output result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:266: Failed ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.9 cachedir: .pytest_cache hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/.hypothesis/examples') rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_verbose0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collecting ... collected 1 item test_verbose.py::test_pass FAILED [100%] ================================================================ FAILURES ================================================================= ________________________________________________________________ test_pass ________________________________________________________________ def test_pass(): import py path = py.path.local(__file__).dirpath().ensure('test.res') count = path.read() or 1 if int(count) <= 1: path.write(int(count) + 1) > raise Exception('Failure: {0}'.format(count)) E Exception: Failure: 1 test_verbose.py:8: Exception ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_verbose.py::test_pass - Exception: Failure: 1 ============================================================ 1 failed in 0.73s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _______________________________________________ test_rerun_on_class_setup_error_with_reruns _______________________________________________ testdir = def test_rerun_on_class_setup_error_with_reruns(testdir): testdir.makepyfile( """  class TestFoo(object):  @classmethod  def setup_class(cls):  assert False   def test_pass():  pass""" ) result = testdir.runpytest("--reruns", "1") > assert_outcomes(result, passed=0, error=1, rerun=1) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:297: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:65: in assert_outcomes check_outcome_field(outcomes, "rerun", rerun) error = 1 failed = 0 field = 'errors' outcomes = {'errors': 1} passed = 0 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'rerun', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.rerun has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'rerun' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_on_class_setup_error_with_reruns0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_rerun_on_class_setup_error_with_reruns.py E [100%] ================================================================= ERRORS ================================================================== ___________________________________________________ ERROR at setup of TestFoo.test_pass ___________________________________________________ cls = @classmethod def setup_class(cls): > assert False E assert False test_rerun_on_class_setup_error_with_reruns.py:4: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_rerun_on_class_setup_error_with_reruns.py::TestFoo::test_pass - assert False ============================================================ 1 error in 0.61s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _______________________________________________________ test_reruns_with_delay[-1] ________________________________________________________ testdir = delay_time = -1 @pytest.mark.parametrize("delay_time", [-1, 0, 0.0, 1, 2.5]) def test_reruns_with_delay(testdir, delay_time): testdir.makepyfile( """  def test_fail():  assert False""" ) time.sleep = mock.MagicMock() result = testdir.runpytest("--reruns", "3", "--reruns-delay", str(delay_time)) if delay_time < 0: > result.stdout.fnmatch_lines( "*UserWarning: Delay time between re-runs cannot be < 0. " "Using default value: 0" ) E Failed: nomatch: '*UserWarning: Delay time between re-runs cannot be < 0. Using default value: 0' E and: '=========================================================== test session starts ===========================================================' E and: 'platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1' E and: 'rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_delay0' E and: 'plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0' E and: 'collected 1 item' E and: '' E and: 'test_reruns_with_delay.py F [100%]' E and: '' E and: '================================================================ FAILURES =================================================================' E and: '________________________________________________________________ test_fail ________________________________________________________________' E and: '' E and: ' def test_fail():' E and: '> assert False' E and: 'E assert False' E and: '' E and: 'test_reruns_with_delay.py:2: AssertionError' E and: '===Flaky Test Report===' E and: '' E and: 'test_pass failed (1 runs remaining out of 2).' E and: "\t" E and: '\tFailure: 1' E and: '\t[]' E and: 'test_pass passed 1 out of the required 1 times. Success!' E and: 'test_pass failed (1 runs remaining out of 2).' E and: "\t" E and: '\tFailure: 1' E and: '\t[]' E and: 'test_pass failed; it passed 0 out of the required 1 times.' E and: "\t" E and: '\tFailure: 2' E and: '\t[]' E and: '' E and: '===End Flaky Test Report===' E and: '========================================================= short test summary info =========================================================' E and: 'FAILED test_reruns_with_delay.py::test_fail - assert False' E and: '============================================================ 1 failed in 0.42s ============================================================' E and: "pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'." E remains unmatched: '*UserWarning: Delay time between re-runs cannot be < 0. Using default value: 0' delay_time = -1 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:326: Failed ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_delay0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_delay.py F [100%] ================================================================ FAILURES ================================================================= ________________________________________________________________ test_fail ________________________________________________________________ def test_fail(): > assert False E assert False test_reruns_with_delay.py:2: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_reruns_with_delay.py::test_fail - assert False ============================================================ 1 failed in 0.42s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ________________________________________________________ test_reruns_with_delay[0] ________________________________________________________ __wrapped_mock_method__ = , args = (, 0) kwargs = {}, __tracebackhide__ = True, msg = 'expected call not found.\nExpected: mock(0)\nActual: not called.' __mock_self = def assert_wrapper( __wrapped_mock_method__: Callable[..., Any], *args: Any, **kwargs: Any ) -> None: __tracebackhide__ = True try: > __wrapped_mock_method__(*args, **kwargs) __mock_self = __tracebackhide__ = True __wrapped_mock_method__ = args = (, 0) kwargs = {} msg = 'expected call not found.\nExpected: mock(0)\nActual: not called.' /usr/lib/python3.9/site-packages/pytest_mock/plugin.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = (0,), kwargs = {}, expected = 'mock(0)', actual = 'not called.' error_message = 'expected call not found.\nExpected: mock(0)\nActual: not called.' def assert_called_with(self, /, *args, **kwargs): """assert that the last call was made with the specified arguments.   Raises an AssertionError if the args and keyword args passed in are  different to the last call to the mock.""" if self.call_args is None: expected = self._format_mock_call_signature(args, kwargs) actual = 'not called.' error_message = ('expected call not found.\nExpected: %s\nActual: %s' % (expected, actual)) > raise AssertionError(error_message) E AssertionError: expected call not found. E Expected: mock(0) E Actual: not called. actual = 'not called.' args = (0,) error_message = 'expected call not found.\nExpected: mock(0)\nActual: not called.' expected = 'mock(0)' kwargs = {} self = /usr/lib/python3.9/unittest/mock.py:898: AssertionError During handling of the above exception, another exception occurred: testdir = delay_time = 0 @pytest.mark.parametrize("delay_time", [-1, 0, 0.0, 1, 2.5]) def test_reruns_with_delay(testdir, delay_time): testdir.makepyfile( """  def test_fail():  assert False""" ) time.sleep = mock.MagicMock() result = testdir.runpytest("--reruns", "3", "--reruns-delay", str(delay_time)) if delay_time < 0: result.stdout.fnmatch_lines( "*UserWarning: Delay time between re-runs cannot be < 0. " "Using default value: 0" ) delay_time = 0 > time.sleep.assert_called_with(delay_time) E AssertionError: expected call not found. E Expected: mock(0) E Actual: not called. delay_time = 0 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:332: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_delay1 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_delay.py F [100%] ================================================================ FAILURES ================================================================= ________________________________________________________________ test_fail ________________________________________________________________ def test_fail(): > assert False E assert False test_reruns_with_delay.py:2: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_reruns_with_delay.py::test_fail - assert False ============================================================ 1 failed in 0.53s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _______________________________________________________ test_reruns_with_delay[0.0] _______________________________________________________ __wrapped_mock_method__ = , args = (, 0.0) kwargs = {}, __tracebackhide__ = True, msg = 'expected call not found.\nExpected: mock(0.0)\nActual: not called.' __mock_self = def assert_wrapper( __wrapped_mock_method__: Callable[..., Any], *args: Any, **kwargs: Any ) -> None: __tracebackhide__ = True try: > __wrapped_mock_method__(*args, **kwargs) __mock_self = __tracebackhide__ = True __wrapped_mock_method__ = args = (, 0.0) kwargs = {} msg = 'expected call not found.\nExpected: mock(0.0)\nActual: not called.' /usr/lib/python3.9/site-packages/pytest_mock/plugin.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = (0.0,), kwargs = {}, expected = 'mock(0.0)', actual = 'not called.' error_message = 'expected call not found.\nExpected: mock(0.0)\nActual: not called.' def assert_called_with(self, /, *args, **kwargs): """assert that the last call was made with the specified arguments.   Raises an AssertionError if the args and keyword args passed in are  different to the last call to the mock.""" if self.call_args is None: expected = self._format_mock_call_signature(args, kwargs) actual = 'not called.' error_message = ('expected call not found.\nExpected: %s\nActual: %s' % (expected, actual)) > raise AssertionError(error_message) E AssertionError: expected call not found. E Expected: mock(0.0) E Actual: not called. actual = 'not called.' args = (0.0,) error_message = 'expected call not found.\nExpected: mock(0.0)\nActual: not called.' expected = 'mock(0.0)' kwargs = {} self = /usr/lib/python3.9/unittest/mock.py:898: AssertionError During handling of the above exception, another exception occurred: testdir = delay_time = 0.0 @pytest.mark.parametrize("delay_time", [-1, 0, 0.0, 1, 2.5]) def test_reruns_with_delay(testdir, delay_time): testdir.makepyfile( """  def test_fail():  assert False""" ) time.sleep = mock.MagicMock() result = testdir.runpytest("--reruns", "3", "--reruns-delay", str(delay_time)) if delay_time < 0: result.stdout.fnmatch_lines( "*UserWarning: Delay time between re-runs cannot be < 0. " "Using default value: 0" ) delay_time = 0 > time.sleep.assert_called_with(delay_time) E AssertionError: expected call not found. E Expected: mock(0.0) E Actual: not called. delay_time = 0.0 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:332: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_delay2 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_delay.py F [100%] ================================================================ FAILURES ================================================================= ________________________________________________________________ test_fail ________________________________________________________________ def test_fail(): > assert False E assert False test_reruns_with_delay.py:2: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_reruns_with_delay.py::test_fail - assert False ============================================================ 1 failed in 0.59s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ________________________________________________________ test_reruns_with_delay[1] ________________________________________________________ __wrapped_mock_method__ = , args = (, 1) kwargs = {}, __tracebackhide__ = True, msg = 'expected call not found.\nExpected: mock(1)\nActual: not called.' __mock_self = def assert_wrapper( __wrapped_mock_method__: Callable[..., Any], *args: Any, **kwargs: Any ) -> None: __tracebackhide__ = True try: > __wrapped_mock_method__(*args, **kwargs) __mock_self = __tracebackhide__ = True __wrapped_mock_method__ = args = (, 1) kwargs = {} msg = 'expected call not found.\nExpected: mock(1)\nActual: not called.' /usr/lib/python3.9/site-packages/pytest_mock/plugin.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = (1,), kwargs = {}, expected = 'mock(1)', actual = 'not called.' error_message = 'expected call not found.\nExpected: mock(1)\nActual: not called.' def assert_called_with(self, /, *args, **kwargs): """assert that the last call was made with the specified arguments.   Raises an AssertionError if the args and keyword args passed in are  different to the last call to the mock.""" if self.call_args is None: expected = self._format_mock_call_signature(args, kwargs) actual = 'not called.' error_message = ('expected call not found.\nExpected: %s\nActual: %s' % (expected, actual)) > raise AssertionError(error_message) E AssertionError: expected call not found. E Expected: mock(1) E Actual: not called. actual = 'not called.' args = (1,) error_message = 'expected call not found.\nExpected: mock(1)\nActual: not called.' expected = 'mock(1)' kwargs = {} self = /usr/lib/python3.9/unittest/mock.py:898: AssertionError During handling of the above exception, another exception occurred: testdir = delay_time = 1 @pytest.mark.parametrize("delay_time", [-1, 0, 0.0, 1, 2.5]) def test_reruns_with_delay(testdir, delay_time): testdir.makepyfile( """  def test_fail():  assert False""" ) time.sleep = mock.MagicMock() result = testdir.runpytest("--reruns", "3", "--reruns-delay", str(delay_time)) if delay_time < 0: result.stdout.fnmatch_lines( "*UserWarning: Delay time between re-runs cannot be < 0. " "Using default value: 0" ) delay_time = 0 > time.sleep.assert_called_with(delay_time) E AssertionError: expected call not found. E Expected: mock(1) E Actual: not called. delay_time = 1 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:332: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_delay3 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_delay.py F [100%] ================================================================ FAILURES ================================================================= ________________________________________________________________ test_fail ________________________________________________________________ def test_fail(): > assert False E assert False test_reruns_with_delay.py:2: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_reruns_with_delay.py::test_fail - assert False ============================================================ 1 failed in 0.48s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _______________________________________________________ test_reruns_with_delay[2.5] _______________________________________________________ __wrapped_mock_method__ = , args = (, 2.5) kwargs = {}, __tracebackhide__ = True, msg = 'expected call not found.\nExpected: mock(2.5)\nActual: not called.' __mock_self = def assert_wrapper( __wrapped_mock_method__: Callable[..., Any], *args: Any, **kwargs: Any ) -> None: __tracebackhide__ = True try: > __wrapped_mock_method__(*args, **kwargs) __mock_self = __tracebackhide__ = True __wrapped_mock_method__ = args = (, 2.5) kwargs = {} msg = 'expected call not found.\nExpected: mock(2.5)\nActual: not called.' /usr/lib/python3.9/site-packages/pytest_mock/plugin.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = (2.5,), kwargs = {}, expected = 'mock(2.5)', actual = 'not called.' error_message = 'expected call not found.\nExpected: mock(2.5)\nActual: not called.' def assert_called_with(self, /, *args, **kwargs): """assert that the last call was made with the specified arguments.   Raises an AssertionError if the args and keyword args passed in are  different to the last call to the mock.""" if self.call_args is None: expected = self._format_mock_call_signature(args, kwargs) actual = 'not called.' error_message = ('expected call not found.\nExpected: %s\nActual: %s' % (expected, actual)) > raise AssertionError(error_message) E AssertionError: expected call not found. E Expected: mock(2.5) E Actual: not called. actual = 'not called.' args = (2.5,) error_message = 'expected call not found.\nExpected: mock(2.5)\nActual: not called.' expected = 'mock(2.5)' kwargs = {} self = /usr/lib/python3.9/unittest/mock.py:898: AssertionError During handling of the above exception, another exception occurred: testdir = delay_time = 2.5 @pytest.mark.parametrize("delay_time", [-1, 0, 0.0, 1, 2.5]) def test_reruns_with_delay(testdir, delay_time): testdir.makepyfile( """  def test_fail():  assert False""" ) time.sleep = mock.MagicMock() result = testdir.runpytest("--reruns", "3", "--reruns-delay", str(delay_time)) if delay_time < 0: result.stdout.fnmatch_lines( "*UserWarning: Delay time between re-runs cannot be < 0. " "Using default value: 0" ) delay_time = 0 > time.sleep.assert_called_with(delay_time) E AssertionError: expected call not found. E Expected: mock(2.5) E Actual: not called. delay_time = 2.5 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:332: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_delay4 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_delay.py F [100%] ================================================================ FAILURES ================================================================= ________________________________________________________________ test_fail ________________________________________________________________ def test_fail(): > assert False E assert False test_reruns_with_delay.py:2: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_reruns_with_delay.py::test_fail - assert False ============================================================ 1 failed in 0.58s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ____________________________________________________ test_reruns_with_delay_marker[-1] ____________________________________________________ testdir = delay_time = -1 @pytest.mark.parametrize("delay_time", [-1, 0, 0.0, 1, 2.5]) def test_reruns_with_delay_marker(testdir, delay_time): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, reruns_delay={delay_time})  def test_fail_two():  assert False""" ) time.sleep = mock.MagicMock() result = testdir.runpytest() if delay_time < 0: > result.stdout.fnmatch_lines( "*UserWarning: Delay time between re-runs cannot be < 0. " "Using default value: 0" ) E Failed: nomatch: '*UserWarning: Delay time between re-runs cannot be < 0. Using default value: 0' E and: '=========================================================== test session starts ===========================================================' E and: 'platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1' E and: 'rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_delay_marker0' E and: 'plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0' E and: 'collected 1 item' E and: '' E and: 'test_reruns_with_delay_marker.py E [100%]' E and: '' E and: '================================================================= ERRORS ==================================================================' E and: '_____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________' E and: '' E and: 'self = , item = ' E and: '' E and: ' def pytest_runtest_setup(self, item):' E and: ' """' E and: " Pytest hook to modify the test before it's run." E and: ' ' E and: ' :param item:' E and: ' The test item.' E and: ' """' E and: ' if not self._has_flaky_attributes(item):' E and: " if hasattr(item, 'iter_markers'):" E and: " for marker in item.iter_markers(name='flaky'):" E and: '> self._make_test_flaky(item, *marker.args, **marker.kwargs)' E and: "E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns'" E and: '' E and: '/usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError' E and: '===Flaky Test Report===' E and: '' E and: 'test_pass failed (1 runs remaining out of 2).' E and: "\t" E and: '\tFailure: 1' E and: '\t[]' E and: 'test_pass passed 1 out of the required 1 times. Success!' E and: 'test_pass failed (1 runs remaining out of 2).' E and: "\t" E and: '\tFailure: 1' E and: '\t[]' E and: 'test_pass failed; it passed 0 out of the required 1 times.' E and: "\t" E and: '\tFailure: 2' E and: '\t[]' E and: '' E and: '===End Flaky Test Report===' E and: '========================================================= short test summary info =========================================================' E and: "ERROR test_reruns_with_delay_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns'" E and: '============================================================ 1 error in 0.93s =============================================================' E and: "pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'." E remains unmatched: '*UserWarning: Delay time between re-runs cannot be < 0. Using default value: 0' delay_time = -1 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:353: Failed ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_delay_marker0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_delay_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_delay_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.93s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ____________________________________________________ test_reruns_with_delay_marker[0] _____________________________________________________ __wrapped_mock_method__ = , args = (, 0) kwargs = {}, __tracebackhide__ = True, msg = 'expected call not found.\nExpected: mock(0)\nActual: not called.' __mock_self = def assert_wrapper( __wrapped_mock_method__: Callable[..., Any], *args: Any, **kwargs: Any ) -> None: __tracebackhide__ = True try: > __wrapped_mock_method__(*args, **kwargs) __mock_self = __tracebackhide__ = True __wrapped_mock_method__ = args = (, 0) kwargs = {} msg = 'expected call not found.\nExpected: mock(0)\nActual: not called.' /usr/lib/python3.9/site-packages/pytest_mock/plugin.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = (0,), kwargs = {}, expected = 'mock(0)', actual = 'not called.' error_message = 'expected call not found.\nExpected: mock(0)\nActual: not called.' def assert_called_with(self, /, *args, **kwargs): """assert that the last call was made with the specified arguments.   Raises an AssertionError if the args and keyword args passed in are  different to the last call to the mock.""" if self.call_args is None: expected = self._format_mock_call_signature(args, kwargs) actual = 'not called.' error_message = ('expected call not found.\nExpected: %s\nActual: %s' % (expected, actual)) > raise AssertionError(error_message) E AssertionError: expected call not found. E Expected: mock(0) E Actual: not called. actual = 'not called.' args = (0,) error_message = 'expected call not found.\nExpected: mock(0)\nActual: not called.' expected = 'mock(0)' kwargs = {} self = /usr/lib/python3.9/unittest/mock.py:898: AssertionError During handling of the above exception, another exception occurred: testdir = delay_time = 0 @pytest.mark.parametrize("delay_time", [-1, 0, 0.0, 1, 2.5]) def test_reruns_with_delay_marker(testdir, delay_time): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, reruns_delay={delay_time})  def test_fail_two():  assert False""" ) time.sleep = mock.MagicMock() result = testdir.runpytest() if delay_time < 0: result.stdout.fnmatch_lines( "*UserWarning: Delay time between re-runs cannot be < 0. " "Using default value: 0" ) delay_time = 0 > time.sleep.assert_called_with(delay_time) E AssertionError: expected call not found. E Expected: mock(0) E Actual: not called. delay_time = 0 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:359: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_delay_marker1 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_delay_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_delay_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.53s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ___________________________________________________ test_reruns_with_delay_marker[0.0] ____________________________________________________ __wrapped_mock_method__ = , args = (, 0.0) kwargs = {}, __tracebackhide__ = True, msg = 'expected call not found.\nExpected: mock(0.0)\nActual: not called.' __mock_self = def assert_wrapper( __wrapped_mock_method__: Callable[..., Any], *args: Any, **kwargs: Any ) -> None: __tracebackhide__ = True try: > __wrapped_mock_method__(*args, **kwargs) __mock_self = __tracebackhide__ = True __wrapped_mock_method__ = args = (, 0.0) kwargs = {} msg = 'expected call not found.\nExpected: mock(0.0)\nActual: not called.' /usr/lib/python3.9/site-packages/pytest_mock/plugin.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = (0.0,), kwargs = {}, expected = 'mock(0.0)', actual = 'not called.' error_message = 'expected call not found.\nExpected: mock(0.0)\nActual: not called.' def assert_called_with(self, /, *args, **kwargs): """assert that the last call was made with the specified arguments.   Raises an AssertionError if the args and keyword args passed in are  different to the last call to the mock.""" if self.call_args is None: expected = self._format_mock_call_signature(args, kwargs) actual = 'not called.' error_message = ('expected call not found.\nExpected: %s\nActual: %s' % (expected, actual)) > raise AssertionError(error_message) E AssertionError: expected call not found. E Expected: mock(0.0) E Actual: not called. actual = 'not called.' args = (0.0,) error_message = 'expected call not found.\nExpected: mock(0.0)\nActual: not called.' expected = 'mock(0.0)' kwargs = {} self = /usr/lib/python3.9/unittest/mock.py:898: AssertionError During handling of the above exception, another exception occurred: testdir = delay_time = 0.0 @pytest.mark.parametrize("delay_time", [-1, 0, 0.0, 1, 2.5]) def test_reruns_with_delay_marker(testdir, delay_time): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, reruns_delay={delay_time})  def test_fail_two():  assert False""" ) time.sleep = mock.MagicMock() result = testdir.runpytest() if delay_time < 0: result.stdout.fnmatch_lines( "*UserWarning: Delay time between re-runs cannot be < 0. " "Using default value: 0" ) delay_time = 0 > time.sleep.assert_called_with(delay_time) E AssertionError: expected call not found. E Expected: mock(0.0) E Actual: not called. delay_time = 0.0 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:359: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_delay_marker2 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_delay_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_delay_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.59s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ____________________________________________________ test_reruns_with_delay_marker[1] _____________________________________________________ __wrapped_mock_method__ = , args = (, 1) kwargs = {}, __tracebackhide__ = True, msg = 'expected call not found.\nExpected: mock(1)\nActual: not called.' __mock_self = def assert_wrapper( __wrapped_mock_method__: Callable[..., Any], *args: Any, **kwargs: Any ) -> None: __tracebackhide__ = True try: > __wrapped_mock_method__(*args, **kwargs) __mock_self = __tracebackhide__ = True __wrapped_mock_method__ = args = (, 1) kwargs = {} msg = 'expected call not found.\nExpected: mock(1)\nActual: not called.' /usr/lib/python3.9/site-packages/pytest_mock/plugin.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = (1,), kwargs = {}, expected = 'mock(1)', actual = 'not called.' error_message = 'expected call not found.\nExpected: mock(1)\nActual: not called.' def assert_called_with(self, /, *args, **kwargs): """assert that the last call was made with the specified arguments.   Raises an AssertionError if the args and keyword args passed in are  different to the last call to the mock.""" if self.call_args is None: expected = self._format_mock_call_signature(args, kwargs) actual = 'not called.' error_message = ('expected call not found.\nExpected: %s\nActual: %s' % (expected, actual)) > raise AssertionError(error_message) E AssertionError: expected call not found. E Expected: mock(1) E Actual: not called. actual = 'not called.' args = (1,) error_message = 'expected call not found.\nExpected: mock(1)\nActual: not called.' expected = 'mock(1)' kwargs = {} self = /usr/lib/python3.9/unittest/mock.py:898: AssertionError During handling of the above exception, another exception occurred: testdir = delay_time = 1 @pytest.mark.parametrize("delay_time", [-1, 0, 0.0, 1, 2.5]) def test_reruns_with_delay_marker(testdir, delay_time): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, reruns_delay={delay_time})  def test_fail_two():  assert False""" ) time.sleep = mock.MagicMock() result = testdir.runpytest() if delay_time < 0: result.stdout.fnmatch_lines( "*UserWarning: Delay time between re-runs cannot be < 0. " "Using default value: 0" ) delay_time = 0 > time.sleep.assert_called_with(delay_time) E AssertionError: expected call not found. E Expected: mock(1) E Actual: not called. delay_time = 1 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:359: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_delay_marker3 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_delay_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_delay_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.93s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ___________________________________________________ test_reruns_with_delay_marker[2.5] ____________________________________________________ __wrapped_mock_method__ = , args = (, 2.5) kwargs = {}, __tracebackhide__ = True, msg = 'expected call not found.\nExpected: mock(2.5)\nActual: not called.' __mock_self = def assert_wrapper( __wrapped_mock_method__: Callable[..., Any], *args: Any, **kwargs: Any ) -> None: __tracebackhide__ = True try: > __wrapped_mock_method__(*args, **kwargs) __mock_self = __tracebackhide__ = True __wrapped_mock_method__ = args = (, 2.5) kwargs = {} msg = 'expected call not found.\nExpected: mock(2.5)\nActual: not called.' /usr/lib/python3.9/site-packages/pytest_mock/plugin.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = (2.5,), kwargs = {}, expected = 'mock(2.5)', actual = 'not called.' error_message = 'expected call not found.\nExpected: mock(2.5)\nActual: not called.' def assert_called_with(self, /, *args, **kwargs): """assert that the last call was made with the specified arguments.   Raises an AssertionError if the args and keyword args passed in are  different to the last call to the mock.""" if self.call_args is None: expected = self._format_mock_call_signature(args, kwargs) actual = 'not called.' error_message = ('expected call not found.\nExpected: %s\nActual: %s' % (expected, actual)) > raise AssertionError(error_message) E AssertionError: expected call not found. E Expected: mock(2.5) E Actual: not called. actual = 'not called.' args = (2.5,) error_message = 'expected call not found.\nExpected: mock(2.5)\nActual: not called.' expected = 'mock(2.5)' kwargs = {} self = /usr/lib/python3.9/unittest/mock.py:898: AssertionError During handling of the above exception, another exception occurred: testdir = delay_time = 2.5 @pytest.mark.parametrize("delay_time", [-1, 0, 0.0, 1, 2.5]) def test_reruns_with_delay_marker(testdir, delay_time): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, reruns_delay={delay_time})  def test_fail_two():  assert False""" ) time.sleep = mock.MagicMock() result = testdir.runpytest() if delay_time < 0: result.stdout.fnmatch_lines( "*UserWarning: Delay time between re-runs cannot be < 0. " "Using default value: 0" ) delay_time = 0 > time.sleep.assert_called_with(delay_time) E AssertionError: expected call not found. E Expected: mock(2.5) E Actual: not called. delay_time = 2.5 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:359: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_delay_marker4 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_delay_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_delay_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.59s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ____________________________________________ test_rerun_on_setup_class_with_error_with_reruns _____________________________________________ testdir = def test_rerun_on_setup_class_with_error_with_reruns(testdir): """  Case: setup_class throwing error on the first execution for parametrized test  """ testdir.makepyfile( """  import pytest   pass_fixture = False   class TestFoo(object):  @classmethod  def setup_class(cls):  global pass_fixture  if not pass_fixture:  pass_fixture = True  assert False  assert True  @pytest.mark.parametrize('param', [1, 2, 3])  def test_pass(self, param):  assert param""" ) result = testdir.runpytest("--reruns", "1") > assert_outcomes(result, passed=3, rerun=1) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:387: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:58: in assert_outcomes check_outcome_field(outcomes, "passed", passed) error = 0 failed = 0 outcomes = {'errors': 3} passed = 3 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 3}, field_name = 'passed', expected_value = 3 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.passed has unexpected value. Expected '3' but got '0' E assert 0 == 3 E +0 E -3 expected_value = 3 field_name = 'passed' field_value = 0 outcomes = {'errors': 3} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_on_setup_class_with_error_with_reruns0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 3 items test_rerun_on_setup_class_with_error_with_reruns.py EEE [100%] ================================================================= ERRORS ================================================================== _________________________________________________ ERROR at setup of TestFoo.test_pass[1] __________________________________________________ cls = @classmethod def setup_class(cls): global pass_fixture if not pass_fixture: pass_fixture = True > assert False E assert False test_rerun_on_setup_class_with_error_with_reruns.py:11: AssertionError _________________________________________________ ERROR at setup of TestFoo.test_pass[2] __________________________________________________ cls = @classmethod def setup_class(cls): global pass_fixture if not pass_fixture: pass_fixture = True > assert False E assert False test_rerun_on_setup_class_with_error_with_reruns.py:11: AssertionError _________________________________________________ ERROR at setup of TestFoo.test_pass[3] __________________________________________________ cls = @classmethod def setup_class(cls): global pass_fixture if not pass_fixture: pass_fixture = True > assert False E assert False test_rerun_on_setup_class_with_error_with_reruns.py:11: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_rerun_on_setup_class_with_error_with_reruns.py::TestFoo::test_pass[1] - assert False ERROR test_rerun_on_setup_class_with_error_with_reruns.py::TestFoo::test_pass[2] - assert False ERROR test_rerun_on_setup_class_with_error_with_reruns.py::TestFoo::test_pass[3] - assert False ============================================================ 3 errors in 0.68s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ________________________________________ test_rerun_on_class_scope_fixture_with_error_with_reruns _________________________________________ testdir = def test_rerun_on_class_scope_fixture_with_error_with_reruns(testdir): """  Case: Class scope fixture throwing error on the first execution  for parametrized test  """ testdir.makepyfile( """  import pytest   pass_fixture = False   class TestFoo(object):   @pytest.fixture(scope="class")  def setup_fixture(self):  global pass_fixture  if not pass_fixture:  pass_fixture = True  assert False  assert True  @pytest.mark.parametrize('param', [1, 2, 3])  def test_pass(self, setup_fixture, param):  assert param""" ) result = testdir.runpytest("--reruns", "1") > assert_outcomes(result, passed=3, rerun=1) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:415: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:58: in assert_outcomes check_outcome_field(outcomes, "passed", passed) error = 0 failed = 0 outcomes = {'errors': 3} passed = 3 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 3}, field_name = 'passed', expected_value = 3 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.passed has unexpected value. Expected '3' but got '0' E assert 0 == 3 E +0 E -3 expected_value = 3 field_name = 'passed' field_value = 0 outcomes = {'errors': 3} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_on_class_scope_fixture_with_error_with_reruns0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 3 items test_rerun_on_class_scope_fixture_with_error_with_reruns.py EEE [100%] ================================================================= ERRORS ================================================================== _________________________________________________ ERROR at setup of TestFoo.test_pass[1] __________________________________________________ self = @pytest.fixture(scope="class") def setup_fixture(self): global pass_fixture if not pass_fixture: pass_fixture = True > assert False E assert False test_rerun_on_class_scope_fixture_with_error_with_reruns.py:12: AssertionError _________________________________________________ ERROR at setup of TestFoo.test_pass[2] __________________________________________________ self = @pytest.fixture(scope="class") def setup_fixture(self): global pass_fixture if not pass_fixture: pass_fixture = True > assert False E assert False test_rerun_on_class_scope_fixture_with_error_with_reruns.py:12: AssertionError _________________________________________________ ERROR at setup of TestFoo.test_pass[3] __________________________________________________ self = @pytest.fixture(scope="class") def setup_fixture(self): global pass_fixture if not pass_fixture: pass_fixture = True > assert False E assert False test_rerun_on_class_scope_fixture_with_error_with_reruns.py:12: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_rerun_on_class_scope_fixture_with_error_with_reruns.py::TestFoo::test_pass[1] - assert False ERROR test_rerun_on_class_scope_fixture_with_error_with_reruns.py::TestFoo::test_pass[2] - assert False ERROR test_rerun_on_class_scope_fixture_with_error_with_reruns.py::TestFoo::test_pass[3] - assert False ============================================================ 3 errors in 0.48s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ________________________________________________ test_rerun_on_module_fixture_with_reruns _________________________________________________ testdir = def test_rerun_on_module_fixture_with_reruns(testdir): """  Case: Module scope fixture is not re-executed when class scope fixture throwing  error on the first execution for parametrized test  """ testdir.makepyfile( """  import pytest   pass_fixture = False   @pytest.fixture(scope='module')  def module_fixture():  assert not pass_fixture   class TestFoo(object):  @pytest.fixture(scope="class")  def setup_fixture(self):  global pass_fixture  if not pass_fixture:  pass_fixture = True  assert False  assert True  def test_pass_1(self, module_fixture, setup_fixture):  assert True   def test_pass_2(self, module_fixture, setup_fixture):  assert True""" ) result = testdir.runpytest("--reruns", "1") > assert_outcomes(result, passed=2, rerun=1) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:448: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:58: in assert_outcomes check_outcome_field(outcomes, "passed", passed) error = 0 failed = 0 outcomes = {'errors': 2} passed = 2 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 2}, field_name = 'passed', expected_value = 2 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.passed has unexpected value. Expected '2' but got '0' E assert 0 == 2 E +0 E -2 expected_value = 2 field_name = 'passed' field_value = 0 outcomes = {'errors': 2} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_on_module_fixture_with_reruns0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 2 items test_rerun_on_module_fixture_with_reruns.py EE [100%] ================================================================= ERRORS ================================================================== __________________________________________________ ERROR at setup of TestFoo.test_pass_1 __________________________________________________ self = @pytest.fixture(scope="class") def setup_fixture(self): global pass_fixture if not pass_fixture: pass_fixture = True > assert False E assert False test_rerun_on_module_fixture_with_reruns.py:15: AssertionError __________________________________________________ ERROR at setup of TestFoo.test_pass_2 __________________________________________________ self = @pytest.fixture(scope="class") def setup_fixture(self): global pass_fixture if not pass_fixture: pass_fixture = True > assert False E assert False test_rerun_on_module_fixture_with_reruns.py:15: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_rerun_on_module_fixture_with_reruns.py::TestFoo::test_pass_1 - assert False ERROR test_rerun_on_module_fixture_with_reruns.py::TestFoo::test_pass_2 - assert False ============================================================ 2 errors in 0.57s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ________________________________________________ test_rerun_on_session_fixture_with_reruns ________________________________________________ testdir = def test_rerun_on_session_fixture_with_reruns(testdir): """  Case: Module scope fixture is not re-executed when class scope fixture  throwing error on the first execution for parametrized test  """ testdir.makepyfile( """  import pytest   pass_fixture = False   @pytest.fixture(scope='session')  def session_fixture():  assert not pass_fixture   class TestFoo(object):  @pytest.fixture(scope="class")  def setup_fixture(self):  global pass_fixture  if not pass_fixture:  pass_fixture = True  assert False  assert True   def test_pass_1(self, session_fixture, setup_fixture):  assert True  def test_pass_2(self, session_fixture, setup_fixture):  assert True""" ) result = testdir.runpytest("--reruns", "1") > assert_outcomes(result, passed=2, rerun=1) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:481: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:58: in assert_outcomes check_outcome_field(outcomes, "passed", passed) error = 0 failed = 0 outcomes = {'errors': 2} passed = 2 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 2}, field_name = 'passed', expected_value = 2 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.passed has unexpected value. Expected '2' but got '0' E assert 0 == 2 E +0 E -2 expected_value = 2 field_name = 'passed' field_value = 0 outcomes = {'errors': 2} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_on_session_fixture_with_reruns0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 2 items test_rerun_on_session_fixture_with_reruns.py EE [100%] ================================================================= ERRORS ================================================================== __________________________________________________ ERROR at setup of TestFoo.test_pass_1 __________________________________________________ self = @pytest.fixture(scope="class") def setup_fixture(self): global pass_fixture if not pass_fixture: pass_fixture = True > assert False E assert False test_rerun_on_session_fixture_with_reruns.py:15: AssertionError __________________________________________________ ERROR at setup of TestFoo.test_pass_2 __________________________________________________ self = @pytest.fixture(scope="class") def setup_fixture(self): global pass_fixture if not pass_fixture: pass_fixture = True > assert False E assert False test_rerun_on_session_fixture_with_reruns.py:15: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_rerun_on_session_fixture_with_reruns.py::TestFoo::test_pass_1 - assert False ERROR test_rerun_on_session_fixture_with_reruns.py::TestFoo::test_pass_2 - assert False ============================================================ 2 errors in 0.89s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ______________________________________________________ test_execution_count_exposed _______________________________________________________ testdir = def test_execution_count_exposed(testdir): testdir.makepyfile("def test_pass(): assert True") testdir.makeconftest( """  def pytest_runtest_teardown(item):  assert item.execution_count == 3""" ) result = testdir.runpytest("--reruns", "2") > assert_outcomes(result, passed=3, rerun=2) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:492: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:58: in assert_outcomes check_outcome_field(outcomes, "passed", passed) error = 0 failed = 0 outcomes = {'errors': 1, 'passed': 1} passed = 3 rerun = 2 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1, 'passed': 1}, field_name = 'passed', expected_value = 3 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.passed has unexpected value. Expected '3' but got '1' E assert 1 == 3 E +1 E -3 expected_value = 3 field_name = 'passed' field_value = 1 outcomes = {'errors': 1, 'passed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_execution_count_exposed0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_execution_count_exposed.py .E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at teardown of test_pass ______________________________________________________ item = def pytest_runtest_teardown(item): > assert item.execution_count == 3 E AttributeError: 'Function' object has no attribute 'execution_count' conftest.py:2: AttributeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_execution_count_exposed.py::test_pass - AttributeError: 'Function' object has no attribute 'execution_count' ======================================================= 1 passed, 1 error in 0.80s ======================================================== pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ____________________________________________________________ test_rerun_report ____________________________________________________________ testdir = def test_rerun_report(testdir): testdir.makepyfile("def test_pass(): assert False") testdir.makeconftest( """  def pytest_runtest_logreport(report):  assert hasattr(report, 'rerun')  assert isinstance(report.rerun, int)  assert report.rerun <= 2  """ ) result = testdir.runpytest("--reruns", "2") > assert_outcomes(result, failed=1, rerun=2, passed=0) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:506: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {} passed = 0 rerun = 2 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_report0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_rerun_report.py INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/usr/lib/python3.9/site-packages/_pytest/main.py", line 269, in wrap_session INTERNALERROR> session.exitstatus = doit(config, session) or 0 INTERNALERROR> File "/usr/lib/python3.9/site-packages/_pytest/main.py", line 323, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/hooks.py", line 286, in __call__ INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 93, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 337, in traced_hookexec INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 52, in from_call INTERNALERROR> result = func() INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 335, in INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs)) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 84, in INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/usr/lib/python3.9/site-packages/_pytest/main.py", line 348, in pytest_runtestloop INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/hooks.py", line 286, in __call__ INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 93, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 337, in traced_hookexec INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 52, in from_call INTERNALERROR> result = func() INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 335, in INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs)) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 84, in INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py", line 94, in pytest_runtest_protocol INTERNALERROR> self.runner.pytest_runtest_protocol(item, nextitem) INTERNALERROR> File "/usr/lib/python3.9/site-packages/_pytest/runner.py", line 109, in pytest_runtest_protocol INTERNALERROR> runtestprotocol(item, nextitem=nextitem) INTERNALERROR> File "/usr/lib/python3.9/site-packages/_pytest/runner.py", line 120, in runtestprotocol INTERNALERROR> rep = call_and_report(item, "setup", log) INTERNALERROR> File "/usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py", line 154, in call_and_report INTERNALERROR> hook.pytest_runtest_logreport(report=report) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/hooks.py", line 286, in __call__ INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 93, in _hookexec INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 337, in traced_hookexec INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 52, in from_call INTERNALERROR> result = func() INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 335, in INTERNALERROR> outcome = _Result.from_call(lambda: oldcall(hook, hook_impls, kwargs)) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 84, in INTERNALERROR> self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall( INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 208, in _multicall INTERNALERROR> return outcome.get_result() INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/usr/lib/python3.9/site-packages/pluggy/callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_rerun_report0/conftest.py", line 2, in pytest_runtest_logreport INTERNALERROR> assert hasattr(report, 'rerun') INTERNALERROR> AssertionError: assert False INTERNALERROR> + where False = hasattr(, 'rerun') ========================================================== no tests ran in 0.49s ========================================================== pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ______________________________________________ test_only_rerun_flag[only_rerun_texts0-True] _______________________________________________ testdir = only_rerun_texts = ['AssertionError'], should_rerun = True @pytest.mark.parametrize( "only_rerun_texts, should_rerun", [ (["AssertionError"], True), (["Assertion*"], True), (["Assertion"], True), (["ValueError"], False), ([""], True), (["AssertionError: "], True), (["AssertionError: ERR"], True), (["ERR"], True), (["AssertionError,ValueError"], False), (["AssertionError ValueError"], False), (["AssertionError", "ValueError"], True), ], ) def test_only_rerun_flag(testdir, only_rerun_texts, should_rerun): testdir.makepyfile('def test_only_rerun(): raise AssertionError("ERR")') num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = num_reruns if should_rerun else 0 pytest_args = ["--reruns", str(num_reruns)] for only_rerun_text in only_rerun_texts: pytest_args.extend(["--only-rerun", only_rerun_text]) result = testdir.runpytest(*pytest_args) > assert_outcomes( result, passed=num_passed, failed=num_failed, rerun=num_reruns_actual ) num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = 1 only_rerun_text = 'AssertionError' only_rerun_texts = ['AssertionError'] pytest_args = ['--reruns', '1', '--only-rerun', 'AssertionError'] result = should_rerun = True testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:550: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:65: in assert_outcomes check_outcome_field(outcomes, "rerun", rerun) error = 0 failed = 1 field = 'errors' outcomes = {'failed': 1} passed = 0 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'failed': 1}, field_name = 'rerun', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.rerun has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'rerun' field_value = 0 outcomes = {'failed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_only_rerun_flag0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_only_rerun_flag.py F [100%] ================================================================ FAILURES ================================================================= _____________________________________________________________ test_only_rerun _____________________________________________________________ > def test_only_rerun(): raise AssertionError("ERR") E AssertionError: ERR test_only_rerun_flag.py:1: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_only_rerun_flag.py::test_only_rerun - AssertionError: ERR ============================================================ 1 failed in 0.55s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ______________________________________________ test_only_rerun_flag[only_rerun_texts1-True] _______________________________________________ testdir = only_rerun_texts = ['Assertion*'], should_rerun = True @pytest.mark.parametrize( "only_rerun_texts, should_rerun", [ (["AssertionError"], True), (["Assertion*"], True), (["Assertion"], True), (["ValueError"], False), ([""], True), (["AssertionError: "], True), (["AssertionError: ERR"], True), (["ERR"], True), (["AssertionError,ValueError"], False), (["AssertionError ValueError"], False), (["AssertionError", "ValueError"], True), ], ) def test_only_rerun_flag(testdir, only_rerun_texts, should_rerun): testdir.makepyfile('def test_only_rerun(): raise AssertionError("ERR")') num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = num_reruns if should_rerun else 0 pytest_args = ["--reruns", str(num_reruns)] for only_rerun_text in only_rerun_texts: pytest_args.extend(["--only-rerun", only_rerun_text]) result = testdir.runpytest(*pytest_args) > assert_outcomes( result, passed=num_passed, failed=num_failed, rerun=num_reruns_actual ) num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = 1 only_rerun_text = 'Assertion*' only_rerun_texts = ['Assertion*'] pytest_args = ['--reruns', '1', '--only-rerun', 'Assertion*'] result = should_rerun = True testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:550: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:65: in assert_outcomes check_outcome_field(outcomes, "rerun", rerun) error = 0 failed = 1 field = 'errors' outcomes = {'failed': 1} passed = 0 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'failed': 1}, field_name = 'rerun', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.rerun has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'rerun' field_value = 0 outcomes = {'failed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_only_rerun_flag1 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_only_rerun_flag.py F [100%] ================================================================ FAILURES ================================================================= _____________________________________________________________ test_only_rerun _____________________________________________________________ > def test_only_rerun(): raise AssertionError("ERR") E AssertionError: ERR test_only_rerun_flag.py:1: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_only_rerun_flag.py::test_only_rerun - AssertionError: ERR ============================================================ 1 failed in 0.58s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ______________________________________________ test_only_rerun_flag[only_rerun_texts2-True] _______________________________________________ testdir = only_rerun_texts = ['Assertion'], should_rerun = True @pytest.mark.parametrize( "only_rerun_texts, should_rerun", [ (["AssertionError"], True), (["Assertion*"], True), (["Assertion"], True), (["ValueError"], False), ([""], True), (["AssertionError: "], True), (["AssertionError: ERR"], True), (["ERR"], True), (["AssertionError,ValueError"], False), (["AssertionError ValueError"], False), (["AssertionError", "ValueError"], True), ], ) def test_only_rerun_flag(testdir, only_rerun_texts, should_rerun): testdir.makepyfile('def test_only_rerun(): raise AssertionError("ERR")') num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = num_reruns if should_rerun else 0 pytest_args = ["--reruns", str(num_reruns)] for only_rerun_text in only_rerun_texts: pytest_args.extend(["--only-rerun", only_rerun_text]) result = testdir.runpytest(*pytest_args) > assert_outcomes( result, passed=num_passed, failed=num_failed, rerun=num_reruns_actual ) num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = 1 only_rerun_text = 'Assertion' only_rerun_texts = ['Assertion'] pytest_args = ['--reruns', '1', '--only-rerun', 'Assertion'] result = should_rerun = True testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:550: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:65: in assert_outcomes check_outcome_field(outcomes, "rerun", rerun) error = 0 failed = 1 field = 'errors' outcomes = {'failed': 1} passed = 0 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'failed': 1}, field_name = 'rerun', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.rerun has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'rerun' field_value = 0 outcomes = {'failed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_only_rerun_flag2 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_only_rerun_flag.py F [100%] ================================================================ FAILURES ================================================================= _____________________________________________________________ test_only_rerun _____________________________________________________________ > def test_only_rerun(): raise AssertionError("ERR") E AssertionError: ERR test_only_rerun_flag.py:1: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_only_rerun_flag.py::test_only_rerun - AssertionError: ERR ============================================================ 1 failed in 0.56s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ______________________________________________ test_only_rerun_flag[only_rerun_texts4-True] _______________________________________________ testdir = only_rerun_texts = [''], should_rerun = True @pytest.mark.parametrize( "only_rerun_texts, should_rerun", [ (["AssertionError"], True), (["Assertion*"], True), (["Assertion"], True), (["ValueError"], False), ([""], True), (["AssertionError: "], True), (["AssertionError: ERR"], True), (["ERR"], True), (["AssertionError,ValueError"], False), (["AssertionError ValueError"], False), (["AssertionError", "ValueError"], True), ], ) def test_only_rerun_flag(testdir, only_rerun_texts, should_rerun): testdir.makepyfile('def test_only_rerun(): raise AssertionError("ERR")') num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = num_reruns if should_rerun else 0 pytest_args = ["--reruns", str(num_reruns)] for only_rerun_text in only_rerun_texts: pytest_args.extend(["--only-rerun", only_rerun_text]) result = testdir.runpytest(*pytest_args) > assert_outcomes( result, passed=num_passed, failed=num_failed, rerun=num_reruns_actual ) num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = 1 only_rerun_text = '' only_rerun_texts = [''] pytest_args = ['--reruns', '1', '--only-rerun', ''] result = should_rerun = True testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:550: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:65: in assert_outcomes check_outcome_field(outcomes, "rerun", rerun) error = 0 failed = 1 field = 'errors' outcomes = {'failed': 1} passed = 0 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'failed': 1}, field_name = 'rerun', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.rerun has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'rerun' field_value = 0 outcomes = {'failed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_only_rerun_flag4 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_only_rerun_flag.py F [100%] ================================================================ FAILURES ================================================================= _____________________________________________________________ test_only_rerun _____________________________________________________________ > def test_only_rerun(): raise AssertionError("ERR") E AssertionError: ERR test_only_rerun_flag.py:1: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_only_rerun_flag.py::test_only_rerun - AssertionError: ERR ============================================================ 1 failed in 0.57s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ______________________________________________ test_only_rerun_flag[only_rerun_texts5-True] _______________________________________________ testdir = only_rerun_texts = ['AssertionError: '], should_rerun = True @pytest.mark.parametrize( "only_rerun_texts, should_rerun", [ (["AssertionError"], True), (["Assertion*"], True), (["Assertion"], True), (["ValueError"], False), ([""], True), (["AssertionError: "], True), (["AssertionError: ERR"], True), (["ERR"], True), (["AssertionError,ValueError"], False), (["AssertionError ValueError"], False), (["AssertionError", "ValueError"], True), ], ) def test_only_rerun_flag(testdir, only_rerun_texts, should_rerun): testdir.makepyfile('def test_only_rerun(): raise AssertionError("ERR")') num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = num_reruns if should_rerun else 0 pytest_args = ["--reruns", str(num_reruns)] for only_rerun_text in only_rerun_texts: pytest_args.extend(["--only-rerun", only_rerun_text]) result = testdir.runpytest(*pytest_args) > assert_outcomes( result, passed=num_passed, failed=num_failed, rerun=num_reruns_actual ) num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = 1 only_rerun_text = 'AssertionError: ' only_rerun_texts = ['AssertionError: '] pytest_args = ['--reruns', '1', '--only-rerun', 'AssertionError: '] result = should_rerun = True testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:550: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:65: in assert_outcomes check_outcome_field(outcomes, "rerun", rerun) error = 0 failed = 1 field = 'errors' outcomes = {'failed': 1} passed = 0 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'failed': 1}, field_name = 'rerun', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.rerun has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'rerun' field_value = 0 outcomes = {'failed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_only_rerun_flag5 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_only_rerun_flag.py F [100%] ================================================================ FAILURES ================================================================= _____________________________________________________________ test_only_rerun _____________________________________________________________ > def test_only_rerun(): raise AssertionError("ERR") E AssertionError: ERR test_only_rerun_flag.py:1: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_only_rerun_flag.py::test_only_rerun - AssertionError: ERR ============================================================ 1 failed in 0.58s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ______________________________________________ test_only_rerun_flag[only_rerun_texts6-True] _______________________________________________ testdir = only_rerun_texts = ['AssertionError: ERR'], should_rerun = True @pytest.mark.parametrize( "only_rerun_texts, should_rerun", [ (["AssertionError"], True), (["Assertion*"], True), (["Assertion"], True), (["ValueError"], False), ([""], True), (["AssertionError: "], True), (["AssertionError: ERR"], True), (["ERR"], True), (["AssertionError,ValueError"], False), (["AssertionError ValueError"], False), (["AssertionError", "ValueError"], True), ], ) def test_only_rerun_flag(testdir, only_rerun_texts, should_rerun): testdir.makepyfile('def test_only_rerun(): raise AssertionError("ERR")') num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = num_reruns if should_rerun else 0 pytest_args = ["--reruns", str(num_reruns)] for only_rerun_text in only_rerun_texts: pytest_args.extend(["--only-rerun", only_rerun_text]) result = testdir.runpytest(*pytest_args) > assert_outcomes( result, passed=num_passed, failed=num_failed, rerun=num_reruns_actual ) num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = 1 only_rerun_text = 'AssertionError: ERR' only_rerun_texts = ['AssertionError: ERR'] pytest_args = ['--reruns', '1', '--only-rerun', 'AssertionError: ERR'] result = should_rerun = True testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:550: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:65: in assert_outcomes check_outcome_field(outcomes, "rerun", rerun) error = 0 failed = 1 field = 'errors' outcomes = {'failed': 1} passed = 0 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'failed': 1}, field_name = 'rerun', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.rerun has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'rerun' field_value = 0 outcomes = {'failed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_only_rerun_flag6 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_only_rerun_flag.py F [100%] ================================================================ FAILURES ================================================================= _____________________________________________________________ test_only_rerun _____________________________________________________________ > def test_only_rerun(): raise AssertionError("ERR") E AssertionError: ERR test_only_rerun_flag.py:1: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_only_rerun_flag.py::test_only_rerun - AssertionError: ERR ============================================================ 1 failed in 0.57s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ______________________________________________ test_only_rerun_flag[only_rerun_texts7-True] _______________________________________________ testdir = only_rerun_texts = ['ERR'], should_rerun = True @pytest.mark.parametrize( "only_rerun_texts, should_rerun", [ (["AssertionError"], True), (["Assertion*"], True), (["Assertion"], True), (["ValueError"], False), ([""], True), (["AssertionError: "], True), (["AssertionError: ERR"], True), (["ERR"], True), (["AssertionError,ValueError"], False), (["AssertionError ValueError"], False), (["AssertionError", "ValueError"], True), ], ) def test_only_rerun_flag(testdir, only_rerun_texts, should_rerun): testdir.makepyfile('def test_only_rerun(): raise AssertionError("ERR")') num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = num_reruns if should_rerun else 0 pytest_args = ["--reruns", str(num_reruns)] for only_rerun_text in only_rerun_texts: pytest_args.extend(["--only-rerun", only_rerun_text]) result = testdir.runpytest(*pytest_args) > assert_outcomes( result, passed=num_passed, failed=num_failed, rerun=num_reruns_actual ) num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = 1 only_rerun_text = 'ERR' only_rerun_texts = ['ERR'] pytest_args = ['--reruns', '1', '--only-rerun', 'ERR'] result = should_rerun = True testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:550: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:65: in assert_outcomes check_outcome_field(outcomes, "rerun", rerun) error = 0 failed = 1 field = 'errors' outcomes = {'failed': 1} passed = 0 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'failed': 1}, field_name = 'rerun', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.rerun has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'rerun' field_value = 0 outcomes = {'failed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_only_rerun_flag7 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_only_rerun_flag.py F [100%] ================================================================ FAILURES ================================================================= _____________________________________________________________ test_only_rerun _____________________________________________________________ > def test_only_rerun(): raise AssertionError("ERR") E AssertionError: ERR test_only_rerun_flag.py:1: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_only_rerun_flag.py::test_only_rerun - AssertionError: ERR ============================================================ 1 failed in 0.69s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ______________________________________________ test_only_rerun_flag[only_rerun_texts10-True] ______________________________________________ testdir = only_rerun_texts = ['AssertionError', 'ValueError'], should_rerun = True @pytest.mark.parametrize( "only_rerun_texts, should_rerun", [ (["AssertionError"], True), (["Assertion*"], True), (["Assertion"], True), (["ValueError"], False), ([""], True), (["AssertionError: "], True), (["AssertionError: ERR"], True), (["ERR"], True), (["AssertionError,ValueError"], False), (["AssertionError ValueError"], False), (["AssertionError", "ValueError"], True), ], ) def test_only_rerun_flag(testdir, only_rerun_texts, should_rerun): testdir.makepyfile('def test_only_rerun(): raise AssertionError("ERR")') num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = num_reruns if should_rerun else 0 pytest_args = ["--reruns", str(num_reruns)] for only_rerun_text in only_rerun_texts: pytest_args.extend(["--only-rerun", only_rerun_text]) result = testdir.runpytest(*pytest_args) > assert_outcomes( result, passed=num_passed, failed=num_failed, rerun=num_reruns_actual ) num_failed = 1 num_passed = 0 num_reruns = 1 num_reruns_actual = 1 only_rerun_text = 'ValueError' only_rerun_texts = ['AssertionError', 'ValueError'] pytest_args = ['--reruns', '1', '--only-rerun', 'AssertionError', '--only-rerun', 'ValueError'] result = should_rerun = True testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:550: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:65: in assert_outcomes check_outcome_field(outcomes, "rerun", rerun) error = 0 failed = 1 field = 'errors' outcomes = {'failed': 1} passed = 0 rerun = 1 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'failed': 1}, field_name = 'rerun', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.rerun has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'rerun' field_value = 0 outcomes = {'failed': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_only_rerun_flag10 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_only_rerun_flag.py F [100%] ================================================================ FAILURES ================================================================= _____________________________________________________________ test_only_rerun _____________________________________________________________ > def test_only_rerun(): raise AssertionError("ERR") E AssertionError: ERR test_only_rerun_flag.py:1: AssertionError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= FAILED test_only_rerun_flag.py::test_only_rerun - AssertionError: ERR ============================================================ 1 failed in 0.50s ============================================================ pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _______________________________________________ test_reruns_with_condition_marker[True-20] ________________________________________________ testdir = condition = True, expected_reruns = 2 @pytest.mark.parametrize( "condition, expected_reruns", [ (1 == 1, 2), (1 == 2, 0), (True, 2), (False, 0), (1, 2), (0, 0), (["list"], 2), ([], 0), ({"dict": 1}, 2), ({}, 0), (None, 0), ], ) def test_reruns_with_condition_marker(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition={condition})  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=expected_reruns) condition = True expected_reruns = 2 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 2 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_condition_marker0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_condition_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_condition_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.59s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _______________________________________________ test_reruns_with_condition_marker[False-00] _______________________________________________ testdir = condition = False, expected_reruns = 0 @pytest.mark.parametrize( "condition, expected_reruns", [ (1 == 1, 2), (1 == 2, 0), (True, 2), (False, 0), (1, 2), (0, 0), (["list"], 2), ([], 0), ({"dict": 1}, 2), ({}, 0), (None, 0), ], ) def test_reruns_with_condition_marker(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition={condition})  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=expected_reruns) condition = False expected_reruns = 0 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 0 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_condition_marker1 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_condition_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_condition_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.61s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _______________________________________________ test_reruns_with_condition_marker[True-21] ________________________________________________ testdir = condition = True, expected_reruns = 2 @pytest.mark.parametrize( "condition, expected_reruns", [ (1 == 1, 2), (1 == 2, 0), (True, 2), (False, 0), (1, 2), (0, 0), (["list"], 2), ([], 0), ({"dict": 1}, 2), ({}, 0), (None, 0), ], ) def test_reruns_with_condition_marker(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition={condition})  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=expected_reruns) condition = True expected_reruns = 2 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 2 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_condition_marker2 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_condition_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_condition_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.59s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _______________________________________________ test_reruns_with_condition_marker[False-01] _______________________________________________ testdir = condition = False, expected_reruns = 0 @pytest.mark.parametrize( "condition, expected_reruns", [ (1 == 1, 2), (1 == 2, 0), (True, 2), (False, 0), (1, 2), (0, 0), (["list"], 2), ([], 0), ({"dict": 1}, 2), ({}, 0), (None, 0), ], ) def test_reruns_with_condition_marker(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition={condition})  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=expected_reruns) condition = False expected_reruns = 0 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 0 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_condition_marker3 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_condition_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_condition_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.87s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _________________________________________________ test_reruns_with_condition_marker[1-2] __________________________________________________ testdir = condition = 1, expected_reruns = 2 @pytest.mark.parametrize( "condition, expected_reruns", [ (1 == 1, 2), (1 == 2, 0), (True, 2), (False, 0), (1, 2), (0, 0), (["list"], 2), ([], 0), ({"dict": 1}, 2), ({}, 0), (None, 0), ], ) def test_reruns_with_condition_marker(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition={condition})  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=expected_reruns) condition = 1 expected_reruns = 2 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 2 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_condition_marker4 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_condition_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_condition_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.60s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _________________________________________________ test_reruns_with_condition_marker[0-0] __________________________________________________ testdir = condition = 0, expected_reruns = 0 @pytest.mark.parametrize( "condition, expected_reruns", [ (1 == 1, 2), (1 == 2, 0), (True, 2), (False, 0), (1, 2), (0, 0), (["list"], 2), ([], 0), ({"dict": 1}, 2), ({}, 0), (None, 0), ], ) def test_reruns_with_condition_marker(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition={condition})  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=expected_reruns) condition = 0 expected_reruns = 0 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 0 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_condition_marker5 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_condition_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_condition_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.61s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _____________________________________________ test_reruns_with_condition_marker[condition6-2] _____________________________________________ testdir = condition = ['list'], expected_reruns = 2 @pytest.mark.parametrize( "condition, expected_reruns", [ (1 == 1, 2), (1 == 2, 0), (True, 2), (False, 0), (1, 2), (0, 0), (["list"], 2), ([], 0), ({"dict": 1}, 2), ({}, 0), (None, 0), ], ) def test_reruns_with_condition_marker(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition={condition})  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=expected_reruns) condition = ['list'] expected_reruns = 2 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 2 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_condition_marker6 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_condition_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_condition_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.59s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _____________________________________________ test_reruns_with_condition_marker[condition7-0] _____________________________________________ testdir = condition = [], expected_reruns = 0 @pytest.mark.parametrize( "condition, expected_reruns", [ (1 == 1, 2), (1 == 2, 0), (True, 2), (False, 0), (1, 2), (0, 0), (["list"], 2), ([], 0), ({"dict": 1}, 2), ({}, 0), (None, 0), ], ) def test_reruns_with_condition_marker(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition={condition})  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=expected_reruns) condition = [] expected_reruns = 0 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 0 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_condition_marker7 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_condition_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_condition_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.60s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _____________________________________________ test_reruns_with_condition_marker[condition8-2] _____________________________________________ testdir = condition = {'dict': 1}, expected_reruns = 2 @pytest.mark.parametrize( "condition, expected_reruns", [ (1 == 1, 2), (1 == 2, 0), (True, 2), (False, 0), (1, 2), (0, 0), (["list"], 2), ([], 0), ({"dict": 1}, 2), ({}, 0), (None, 0), ], ) def test_reruns_with_condition_marker(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition={condition})  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=expected_reruns) condition = {'dict': 1} expected_reruns = 2 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 2 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_condition_marker8 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_condition_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_condition_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.59s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _____________________________________________ test_reruns_with_condition_marker[condition9-0] _____________________________________________ testdir = condition = {}, expected_reruns = 0 @pytest.mark.parametrize( "condition, expected_reruns", [ (1 == 1, 2), (1 == 2, 0), (True, 2), (False, 0), (1, 2), (0, 0), (["list"], 2), ([], 0), ({"dict": 1}, 2), ({}, 0), (None, 0), ], ) def test_reruns_with_condition_marker(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition={condition})  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=expected_reruns) condition = {} expected_reruns = 0 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 0 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_condition_marker9 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_condition_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_condition_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.58s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ________________________________________________ test_reruns_with_condition_marker[None-0] ________________________________________________ testdir = condition = None, expected_reruns = 0 @pytest.mark.parametrize( "condition, expected_reruns", [ (1 == 1, 2), (1 == 2, 0), (True, 2), (False, 0), (1, 2), (0, 0), (["list"], 2), ([], 0), ({"dict": 1}, 2), ({}, 0), (None, 0), ], ) def test_reruns_with_condition_marker(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition={condition})  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=expected_reruns) condition = None expected_reruns = 0 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 0 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_condition_marker10 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_condition_marker.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_condition_marker.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.61s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ___________________________ test_reruns_with_string_condition[sys.platform.startswith("non-exists") == False-2] ___________________________ testdir = condition = 'sys.platform.startswith("non-exists") == False', expected_reruns = 2 @pytest.mark.parametrize( "condition, expected_reruns", [('sys.platform.startswith("non-exists") == False', 2), ("os.getpid() != -1", 2)], ) # before evaluating the condition expression, sys&os&platform package has been imported def test_reruns_with_string_condition(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition='{condition}')  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=2) condition = 'sys.platform.startswith("non-exists") == False' expected_reruns = 2 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:600: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 2 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_string_condition0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_string_condition.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_string_condition.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.58s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. _________________________________________ test_reruns_with_string_condition[os.getpid() != -1-2] __________________________________________ testdir = condition = 'os.getpid() != -1', expected_reruns = 2 @pytest.mark.parametrize( "condition, expected_reruns", [('sys.platform.startswith("non-exists") == False', 2), ("os.getpid() != -1", 2)], ) # before evaluating the condition expression, sys&os&platform package has been imported def test_reruns_with_string_condition(testdir, condition, expected_reruns): testdir.makepyfile( f"""  import pytest   @pytest.mark.flaky(reruns=2, condition='{condition}')  def test_fail_two():  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=2) condition = 'os.getpid() != -1' expected_reruns = 2 result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:600: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 2 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_string_condition1 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_string_condition.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_string_condition.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' ============================================================ 1 error in 0.59s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ____________________________________________ test_reruns_with_string_condition_with_global_var ____________________________________________ testdir = def test_reruns_with_string_condition_with_global_var(testdir): testdir.makepyfile( """  import pytest   rerunBool = False  @pytest.mark.flaky(reruns=2, condition='rerunBool')  def test_fail_two():  global rerunBool  rerunBool = True  assert False""" ) result = testdir.runpytest() > assert_outcomes(result, passed=0, failed=1, rerun=2) result = testdir = /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:616: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:60: in assert_outcomes check_outcome_field(outcomes, "failed", failed) error = 0 failed = 1 outcomes = {'errors': 1} passed = 0 rerun = 2 result = skipped = 0 xfailed = 0 xpassed = 0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ outcomes = {'errors': 1}, field_name = 'failed', expected_value = 1 def check_outcome_field(outcomes, field_name, expected_value): field_value = outcomes.get(field_name, 0) > assert field_value == expected_value, ( f"outcomes.{field_name} has unexpected value. " f"Expected '{expected_value}' but got '{field_value}'" ) E AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' E assert 0 == 1 E +0 E -1 expected_value = 1 field_name = 'failed' field_value = 0 outcomes = {'errors': 1} /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2/test_pytest_rerunfailures.py:41: AssertionError ---------------------------------------------------------- Captured stdout call ----------------------------------------------------------- =========================================================== test session starts =========================================================== platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 rootdir: /var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/pytest-of-portage/pytest-0/test_reruns_with_string_condition_with_global_var0 plugins: rerunfailures-10.2, datadir-1.3.1, forked-1.3.0, mock-3.6.1, xdist-2.3.0, xprocess-0.18.1, tornado-0.8.1, timeout-1.4.2, hypothesis-6.14.3, flaky-3.7.0, httpbin-1.0.0, lazy-fixture-0.6.3, asyncio-0.16.0, freezegun-0.4.2, trio-0.7.0, regressions-2.2.0, virtualenv-1.7.0, pkgcore-0.12.8, pylama-8.3.6, shutil-1.7.0 collected 1 item test_reruns_with_string_condition_with_global_var.py E [100%] ================================================================= ERRORS ================================================================== _____________________________________________________ ERROR at setup of test_fail_two _____________________________________________________ self = , item = def pytest_runtest_setup(self, item): """ Pytest hook to modify the test before it's run. :param item: The test item. """ if not self._has_flaky_attributes(item): if hasattr(item, 'iter_markers'): for marker in item.iter_markers(name='flaky'): > self._make_test_flaky(item, *marker.args, **marker.kwargs) E TypeError: _make_test_flaky() got an unexpected keyword argument 'reruns' /usr/lib/python3.9/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= ERROR test_reruns_with_string_condition_with_global_var.py::test_fail_two - TypeError: _make_test_flaky() got an unexpected keyword argu... ============================================================ 1 error in 0.60s ============================================================= pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. ===Flaky Test Report=== test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass passed 1 out of the required 1 times. Success! test_pass failed (1 runs remaining out of 2). Failure: 1 [] test_pass failed; it passed 0 out of the required 1 times. Failure: 2 [] ===End Flaky Test Report=== ========================================================= short test summary info ========================================================= SKIPPED [1] test_pytest_rerunfailures.py:300: --result-log removed in pytest>=6.1 FAILED test_pytest_rerunfailures.py::test_error_when_run_with_pdb - Failed: line 'ERROR: --reruns incompatible with --pdb' not found in ... FAILED test_pytest_rerunfailures.py::test_rerun_fails_after_consistent_setup_failure - AssertionError: outcomes.rerun has unexpected val... FAILED test_pytest_rerunfailures.py::test_rerun_passes_after_temporary_setup_failure - AssertionError: outcomes.passed has unexpected va... FAILED test_pytest_rerunfailures.py::test_rerun_fails_after_consistent_test_failure - AssertionError: outcomes.rerun has unexpected valu... FAILED test_pytest_rerunfailures.py::test_rerun_passes_after_temporary_test_failure - AssertionError: outcomes.passed has unexpected val... FAILED test_pytest_rerunfailures.py::test_rerun_passes_after_temporary_test_crash - AssertionError: outcomes.passed has unexpected value... FAILED test_pytest_rerunfailures.py::test_rerun_passes_after_temporary_test_failure_with_flaky_mark - AssertionError: outcomes.passed ha... FAILED test_pytest_rerunfailures.py::test_reruns_if_flaky_mark_is_called_without_options - AssertionError: outcomes.rerun has unexpected... FAILED test_pytest_rerunfailures.py::test_reruns_if_flaky_mark_is_called_with_positional_argument - AssertionError: outcomes.passed has ... FAILED test_pytest_rerunfailures.py::test_no_extra_test_summary_for_reruns_by_default - assert '1 rerun' in "===========================... FAILED test_pytest_rerunfailures.py::test_extra_test_summary_for_reruns - Failed: line 'RERUN test_*:*' not found in output FAILED test_pytest_rerunfailures.py::test_verbose - Failed: line 'test_*:* RERUN*' not found in output FAILED test_pytest_rerunfailures.py::test_rerun_on_class_setup_error_with_reruns - AssertionError: outcomes.rerun has unexpected value. ... FAILED test_pytest_rerunfailures.py::test_reruns_with_delay[-1] - Failed: nomatch: '*UserWarning: Delay time between re-runs cannot be <... FAILED test_pytest_rerunfailures.py::test_reruns_with_delay[0] - AssertionError: expected call not found. FAILED test_pytest_rerunfailures.py::test_reruns_with_delay[0.0] - AssertionError: expected call not found. FAILED test_pytest_rerunfailures.py::test_reruns_with_delay[1] - AssertionError: expected call not found. FAILED test_pytest_rerunfailures.py::test_reruns_with_delay[2.5] - AssertionError: expected call not found. FAILED test_pytest_rerunfailures.py::test_reruns_with_delay_marker[-1] - Failed: nomatch: '*UserWarning: Delay time between re-runs cann... FAILED test_pytest_rerunfailures.py::test_reruns_with_delay_marker[0] - AssertionError: expected call not found. FAILED test_pytest_rerunfailures.py::test_reruns_with_delay_marker[0.0] - AssertionError: expected call not found. FAILED test_pytest_rerunfailures.py::test_reruns_with_delay_marker[1] - AssertionError: expected call not found. FAILED test_pytest_rerunfailures.py::test_reruns_with_delay_marker[2.5] - AssertionError: expected call not found. FAILED test_pytest_rerunfailures.py::test_rerun_on_setup_class_with_error_with_reruns - AssertionError: outcomes.passed has unexpected v... FAILED test_pytest_rerunfailures.py::test_rerun_on_class_scope_fixture_with_error_with_reruns - AssertionError: outcomes.passed has unex... FAILED test_pytest_rerunfailures.py::test_rerun_on_module_fixture_with_reruns - AssertionError: outcomes.passed has unexpected value. Ex... FAILED test_pytest_rerunfailures.py::test_rerun_on_session_fixture_with_reruns - AssertionError: outcomes.passed has unexpected value. E... FAILED test_pytest_rerunfailures.py::test_execution_count_exposed - AssertionError: outcomes.passed has unexpected value. Expected '3' b... FAILED test_pytest_rerunfailures.py::test_rerun_report - AssertionError: outcomes.failed has unexpected value. Expected '1' but got '0' FAILED test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts0-True] - AssertionError: outcomes.rerun has unexpected value.... FAILED test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts1-True] - AssertionError: outcomes.rerun has unexpected value.... FAILED test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts2-True] - AssertionError: outcomes.rerun has unexpected value.... FAILED test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts4-True] - AssertionError: outcomes.rerun has unexpected value.... FAILED test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts5-True] - AssertionError: outcomes.rerun has unexpected value.... FAILED test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts6-True] - AssertionError: outcomes.rerun has unexpected value.... FAILED test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts7-True] - AssertionError: outcomes.rerun has unexpected value.... FAILED test_pytest_rerunfailures.py::test_only_rerun_flag[only_rerun_texts10-True] - AssertionError: outcomes.rerun has unexpected value... FAILED test_pytest_rerunfailures.py::test_reruns_with_condition_marker[True-20] - AssertionError: outcomes.failed has unexpected value. ... FAILED test_pytest_rerunfailures.py::test_reruns_with_condition_marker[False-00] - AssertionError: outcomes.failed has unexpected value.... FAILED test_pytest_rerunfailures.py::test_reruns_with_condition_marker[True-21] - AssertionError: outcomes.failed has unexpected value. ... FAILED test_pytest_rerunfailures.py::test_reruns_with_condition_marker[False-01] - AssertionError: outcomes.failed has unexpected value.... FAILED test_pytest_rerunfailures.py::test_reruns_with_condition_marker[1-2] - AssertionError: outcomes.failed has unexpected value. Expe... FAILED test_pytest_rerunfailures.py::test_reruns_with_condition_marker[0-0] - AssertionError: outcomes.failed has unexpected value. Expe... FAILED test_pytest_rerunfailures.py::test_reruns_with_condition_marker[condition6-2] - AssertionError: outcomes.failed has unexpected va... FAILED test_pytest_rerunfailures.py::test_reruns_with_condition_marker[condition7-0] - AssertionError: outcomes.failed has unexpected va... FAILED test_pytest_rerunfailures.py::test_reruns_with_condition_marker[condition8-2] - AssertionError: outcomes.failed has unexpected va... FAILED test_pytest_rerunfailures.py::test_reruns_with_condition_marker[condition9-0] - AssertionError: outcomes.failed has unexpected va... FAILED test_pytest_rerunfailures.py::test_reruns_with_condition_marker[None-0] - AssertionError: outcomes.failed has unexpected value. E... FAILED test_pytest_rerunfailures.py::test_reruns_with_string_condition[sys.platform.startswith("non-exists") == False-2] - AssertionErro... FAILED test_pytest_rerunfailures.py::test_reruns_with_string_condition[os.getpid() != -1-2] - AssertionError: outcomes.failed has unexpe... FAILED test_pytest_rerunfailures.py::test_reruns_with_string_condition_with_global_var - AssertionError: outcomes.failed has unexpected ... ========================================== 51 failed, 11 passed, 1 skipped in 292.85s (0:04:52) =========================================== pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo().terminate()'. * ERROR: dev-python/pytest-rerunfailures-10.2::gentoo failed (test phase): * pytest failed with python3.9 * * Call stack: * ebuild.sh, line 127: Called src_test * environment, line 2856: Called distutils-r1_src_test * environment, line 1199: Called _distutils-r1_run_foreach_impl 'python_test' * environment, line 452: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' * environment, line 2519: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' * environment, line 2035: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' * environment, line 2033: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' * environment, line 753: Called distutils-r1_run_phase 'python_test' * environment, line 1138: Called python_test * environment, line 2815: Called distutils-r1_python_test * environment, line 1095: Called epytest * environment, line 1551: Called die * The specific snippet of code: * "${@}" || die -n "pytest failed with ${EPYTHON}"; * * If you need support, post the output of `emerge --info '=dev-python/pytest-rerunfailures-10.2::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-python/pytest-rerunfailures-10.2::gentoo'`. * The complete build log is located at '/var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-python/pytest-rerunfailures-10.2/temp/environment'. * Working directory: '/var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2' * S: '/var/tmp/portage/dev-python/pytest-rerunfailures-10.2/work/pytest-rerunfailures-10.2'