/usr/lib/python3.7/site-packages/trio/_core/_multierror.py:450: RuntimeWarning: You seem to already have a custom sys.excepthook handler installed. I'll skip installing trio's custom handler, but this means MultiErrors will not show full tracebacks.
category=RuntimeWarning
Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')
rootdir: /home/fab/Documents/repos/pytest-subtests
plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0
collecting ...
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestFixture.test_simple_terminal_normal[normal] ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <test_subtests.TestFixture object at 0x7f12c26c0fd0>, simple_script = None, testdir = <Testdir local('/tmp/pytest-of-fab/pytest-4/test_simple_terminal_normal0')>
mode = 'normal'
def test_simple_terminal_normal(self, simple_script, testdir, mode):
if mode == "normal":
result = testdir.runpytest()
expected_lines = ["collected 1 item"]
else:
pytest.importorskip("xdist")
result = testdir.runpytest("-n1")
expected_lines = ["gw0 [1]"]
expected_lines += [
"* test_foo [[]custom[]] (i=1) *",
"* test_foo [[]custom[]] (i=3) *",
"* 2 failed, 1 passed in *",
]
> result.stdout.fnmatch_lines(expected_lines)
E Failed: nomatch: 'collected 1 item'
E and: 'Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)'
E and: "hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')"
E and: 'rootdir: /tmp/pytest-of-fab/pytest-4/test_simple_terminal_normal0'
E and: 'plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0'
E and: ''
E and: ''
E and: '―――――――――――――――――――――――――― ERROR at setup of test_foo ――――――――――――――――――――――――――'
E and: 'file /tmp/pytest-of-fab/pytest-4/test_simple_terminal_normal0/test_simple_terminal_normal.py, line 1'
E and: ' def test_foo(subtests):'
E and: "E fixture 'subtests' not found"
E and: '> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave'
E and: "> use 'pytest --fixtures [testpath]' for help on them."
E and: ''
E and: '/tmp/pytest-of-fab/pytest-4/test_simple_terminal_normal0/test_simple_terminal_normal.py:1'
E and: '\r \x1b[32m100% \x1b[0m\x1b[40m██████████\x1b[0m'
E and: '===Flaky Test Report==='
E and: ''
E and: ''
E and: '===End Flaky Test Report==='
E and: ''
E and: 'Results (0.08s):'
E and: '\x1b[31m 1 error\x1b[0m'
E and: ''
E remains unmatched: 'collected 1 item'
/home/fab/Documents/repos/pytest-subtests/tests/test_subtests.py:37: Failed
------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------
Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')
rootdir: /tmp/pytest-of-fab/pytest-4/test_simple_terminal_normal0
plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0
―――――――――――――――――――――――――― ERROR at setup of test_foo ――――――――――――――――――――――――――
file /tmp/pytest-of-fab/pytest-4/test_simple_terminal_normal0/test_simple_terminal_normal.py, line 1
def test_foo(subtests):
E fixture 'subtests' not found
> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave
> use 'pytest --fixtures [testpath]' for help on them.
/tmp/pytest-of-fab/pytest-4/test_simple_terminal_normal0/test_simple_terminal_normal.py:1
100% ██████████
===Flaky Test Report===
===End Flaky Test Report===
Results (0.08s):
1 error
tests/test_subtests.py::TestFixture.test_simple_terminal_normal[normal] ⨯ 5% ▌
tests/test_subtests.py::TestFixture.test_simple_terminal_normal[xdist] s 11% █▏
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestFixture.test_simple_terminal_verbose[normal] ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <test_subtests.TestFixture object at 0x7f12c1a71090>, simple_script = None, testdir = <Testdir local('/tmp/pytest-of-fab/pytest-4/test_simple_terminal_verbose0')>
mode = 'normal'
def test_simple_terminal_verbose(self, simple_script, testdir, mode):
if mode == "normal":
result = testdir.runpytest("-v")
expected_lines = [
"*collected 1 item",
"test_simple_terminal_verbose.py::test_foo PASSED *100%*",
"test_simple_terminal_verbose.py::test_foo FAILED *100%*",
"test_simple_terminal_verbose.py::test_foo PASSED *100%*",
"test_simple_terminal_verbose.py::test_foo FAILED *100%*",
"test_simple_terminal_verbose.py::test_foo PASSED *100%*",
"test_simple_terminal_verbose.py::test_foo PASSED *100%*",
]
else:
pytest.importorskip("xdist")
result = testdir.runpytest("-n1", "-v")
expected_lines = [
"gw0 [1]",
"*gw0*100%* test_simple_terminal_verbose.py::test_foo*",
"*gw0*100%* test_simple_terminal_verbose.py::test_foo*",
"*gw0*100%* test_simple_terminal_verbose.py::test_foo*",
"*gw0*100%* test_simple_terminal_verbose.py::test_foo*",
"*gw0*100%* test_simple_terminal_verbose.py::test_foo*",
"*gw0*100%* test_simple_terminal_verbose.py::test_foo*",
]
expected_lines += [
"* test_foo [[]custom[]] (i=1) *",
"* test_foo [[]custom[]] (i=3) *",
"* 2 failed, 1 passed in *",
]
> result.stdout.fnmatch_lines(expected_lines)
E Failed: nomatch: '*collected 1 item'
E and: 'Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)'
E and: 'cachedir: .pytest_cache'
E and: "hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')"
E and: 'rootdir: /tmp/pytest-of-fab/pytest-4/test_simple_terminal_verbose0'
E and: 'plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0'
E and: 'collecting ... '
E and: ''
E and: '―――――――――――――――――――――――――― ERROR at setup of test_foo ――――――――――――――――――――――――――'
E and: 'file /tmp/pytest-of-fab/pytest-4/test_simple_terminal_verbose0/test_simple_terminal_verbose.py, line 1'
E and: ' def test_foo(subtests):'
E and: "E fixture 'subtests' not found"
E and: '> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave'
E and: "> use 'pytest --fixtures [testpath]' for help on them."
E and: ''
E and: '/tmp/pytest-of-fab/pytest-4/test_simple_terminal_verbose0/test_simple_terminal_verbose.py:1'
E and: '\r \x1b[32m100% \x1b[0m\x1b[40m██████████\x1b[0m'
E and: '===Flaky Test Report==='
E and: ''
E and: ''
E and: '===End Flaky Test Report==='
E and: ''
E and: 'Results (0.06s):'
E and: '\x1b[31m 1 error\x1b[0m'
E and: ''
E remains unmatched: '*collected 1 item'
/home/fab/Documents/repos/pytest-subtests/tests/test_subtests.py:69: Failed
------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------
Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')
rootdir: /tmp/pytest-of-fab/pytest-4/test_simple_terminal_verbose0
plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0
collecting ...
―――――――――――――――――――――――――― ERROR at setup of test_foo ――――――――――――――――――――――――――
file /tmp/pytest-of-fab/pytest-4/test_simple_terminal_verbose0/test_simple_terminal_verbose.py, line 1
def test_foo(subtests):
E fixture 'subtests' not found
> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave
> use 'pytest --fixtures [testpath]' for help on them.
/tmp/pytest-of-fab/pytest-4/test_simple_terminal_verbose0/test_simple_terminal_verbose.py:1
100% ██████████
===Flaky Test Report===
===End Flaky Test Report===
Results (0.06s):
1 error
tests/test_subtests.py::TestFixture.test_simple_terminal_verbose[normal] ⨯ 16% █▋
tests/test_subtests.py::TestFixture.test_simple_terminal_verbose[xdist] s 21% ██▏
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestFixture.test_skip[normal] ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <test_subtests.TestFixture object at 0x7f12cdfb7990>, testdir = <Testdir local('/tmp/pytest-of-fab/pytest-4/test_skip0')>, mode = 'normal'
def test_skip(self, testdir, mode):
testdir.makepyfile(
"""
import pytest
def test_foo(subtests):
for i in range(5):
with subtests.test(msg="custom", i=i):
if i % 2 == 0:
pytest.skip('even number')
"""
)
if mode == "normal":
result = testdir.runpytest()
expected_lines = ["collected 1 item"]
else:
pytest.importorskip("xdist")
result = testdir.runpytest("-n1")
expected_lines = ["gw0 [1]"]
expected_lines += ["* 1 passed, 3 skipped in *"]
> result.stdout.fnmatch_lines(expected_lines)
E Failed: nomatch: 'collected 1 item'
E and: 'Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)'
E and: "hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')"
E and: 'rootdir: /tmp/pytest-of-fab/pytest-4/test_skip0'
E and: 'plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0'
E and: ''
E and: ''
E and: '―――――――――――――――――――――――――― ERROR at setup of test_foo ――――――――――――――――――――――――――'
E and: 'file /tmp/pytest-of-fab/pytest-4/test_skip0/test_skip.py, line 2'
E and: ' def test_foo(subtests):'
E and: "E fixture 'subtests' not found"
E and: '> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave'
E and: "> use 'pytest --fixtures [testpath]' for help on them."
E and: ''
E and: '/tmp/pytest-of-fab/pytest-4/test_skip0/test_skip.py:2'
E and: '\r \x1b[32m100% \x1b[0m\x1b[40m██████████\x1b[0m'
E and: '===Flaky Test Report==='
E and: ''
E and: ''
E and: '===End Flaky Test Report==='
E and: ''
E and: 'Results (0.06s):'
E and: '\x1b[31m 1 error\x1b[0m'
E and: ''
E remains unmatched: 'collected 1 item'
/home/fab/Documents/repos/pytest-subtests/tests/test_subtests.py:90: Failed
------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------
Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')
rootdir: /tmp/pytest-of-fab/pytest-4/test_skip0
plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0
―――――――――――――――――――――――――― ERROR at setup of test_foo ――――――――――――――――――――――――――
file /tmp/pytest-of-fab/pytest-4/test_skip0/test_skip.py, line 2
def test_foo(subtests):
E fixture 'subtests' not found
> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave
> use 'pytest --fixtures [testpath]' for help on them.
/tmp/pytest-of-fab/pytest-4/test_skip0/test_skip.py:2
100% ██████████
===Flaky Test Report===
===End Flaky Test Report===
Results (0.06s):
1 error
tests/test_subtests.py::TestFixture.test_skip[normal] ⨯ 26% ██▋
tests/test_subtests.py::TestFixture.test_skip[xdist] s 32% ███▎
tests/test_subtests.py::TestSubTest.test_simple_terminal_normal[unittest] ✓ 37% ███▊
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestSubTest.test_simple_terminal_normal[pytest-normal] ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <test_subtests.TestSubTest object at 0x7f12cdf6a750>, simple_script = local('/tmp/pytest-of-fab/pytest-4/test_simple_terminal_normal3/test_simple_terminal_normal.py')
testdir = <Testdir local('/tmp/pytest-of-fab/pytest-4/test_simple_terminal_normal3')>, runner = 'pytest-normal'
@pytest.mark.parametrize("runner", ["unittest", "pytest-normal", "pytest-xdist"])
def test_simple_terminal_normal(self, simple_script, testdir, runner):
if runner == "unittest":
result = testdir.run(sys.executable, simple_script)
result.stderr.fnmatch_lines(
[
"FAIL: test_foo (__main__.T) [custom] (i=1)",
"AssertionError: 1 != 0",
"FAIL: test_foo (__main__.T) [custom] (i=3)",
"AssertionError: 1 != 0",
"Ran 1 test in *",
"FAILED (failures=2)",
]
)
else:
if runner == "pytest-normal":
result = testdir.runpytest(simple_script)
expected_lines = ["collected 1 item"]
else:
pytest.importorskip("xdist")
result = testdir.runpytest(simple_script, "-n1")
expected_lines = ["gw0 [1]"]
result.stdout.fnmatch_lines(
expected_lines
+ [
"* T.test_foo [[]custom[]] (i=1) *",
"E * AssertionError: 1 != 0",
"* T.test_foo [[]custom[]] (i=3) *",
"E * AssertionError: 1 != 0",
> "* 2 failed, 1 passed in *",
]
)
E Failed: nomatch: 'collected 1 item'
E and: 'Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)'
E and: "hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')"
E and: 'rootdir: /tmp/pytest-of-fab/pytest-4/test_simple_terminal_normal3'
E and: 'plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0'
E and: ''
E and: ''
E and: '―――――――――――――――――――――――――――――――――― T.test_foo ――――――――――――――――――――――――――――――――――'
E and: ''
E and: 'self = <test_simple_terminal_normal.T testMethod=test_foo>'
E and: ''
E and: ' def test_foo(self):'
E and: ' for i in range(5):'
E and: ' with self.subTest(msg="custom", i=i):'
E and: '> self.assertEqual(i % 2, 0)'
E and: 'E AssertionError: 1 != 0'
E and: ''
E and: 'test_simple_terminal_normal.py:8: AssertionError'
E and: '\r'
E and: '\r \x1b[36m\x1b[0mtest_simple_terminal_normal.py\x1b[0m \x1b[31m⨯\x1b[0m \x1b[31m100% \x1b[0m\x1b[40m\x1b[31m█\x1b[0m\x1b[40m\x1b[31m█████████\x1b[0m'
E and: '===Flaky Test Report==='
E and: ''
E and: ''
E and: '===End Flaky Test Report==='
E and: ''
E and: 'Results (0.08s):'
E and: '\x1b[31m 1 failed\x1b[0m'
E and: ' - \x1b[36m\x1b[0mtest_simple_terminal_normal.py\x1b[0m:5 \x1b[31mT.test_foo\x1b[0m'
E and: ''
E remains unmatched: 'collected 1 item'
/home/fab/Documents/repos/pytest-subtests/tests/test_subtests.py:146: Failed
------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------
Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')
rootdir: /tmp/pytest-of-fab/pytest-4/test_simple_terminal_normal3
plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0
―――――――――――――――――――――――――――――――――― T.test_foo ――――――――――――――――――――――――――――――――――
self = <test_simple_terminal_normal.T testMethod=test_foo>
def test_foo(self):
for i in range(5):
with self.subTest(msg="custom", i=i):
> self.assertEqual(i % 2, 0)
E AssertionError: 1 != 0
test_simple_terminal_normal.py:8: AssertionError
test_simple_terminal_normal.py ⨯ 100% ██████████
===Flaky Test Report===
===End Flaky Test Report===
Results (0.08s):
1 failed
- test_simple_terminal_normal.py:5 T.test_foo
tests/test_subtests.py::TestSubTest.test_simple_terminal_normal[pytest-normal] ⨯ 42% ████▎
tests/test_subtests.py::TestSubTest.test_simple_terminal_normal[pytest-xdist] s 47% ████▊
tests/test_subtests.py::TestSubTest.test_simple_terminal_verbose[unittest] ✓ 53% █████▍
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestSubTest.test_simple_terminal_verbose[pytest-normal] ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <test_subtests.TestSubTest object at 0x7f12cdefdad0>, simple_script = local('/tmp/pytest-of-fab/pytest-4/test_simple_terminal_verbose3/test_simple_terminal_verbose.py')
testdir = <Testdir local('/tmp/pytest-of-fab/pytest-4/test_simple_terminal_verbose3')>, runner = 'pytest-normal'
@pytest.mark.parametrize("runner", ["unittest", "pytest-normal", "pytest-xdist"])
def test_simple_terminal_verbose(self, simple_script, testdir, runner):
if runner == "unittest":
result = testdir.run(sys.executable, simple_script, "-v")
result.stderr.fnmatch_lines(
[
"test_foo (__main__.T) ... ",
"FAIL: test_foo (__main__.T) [custom] (i=1)",
"AssertionError: 1 != 0",
"FAIL: test_foo (__main__.T) [custom] (i=3)",
"AssertionError: 1 != 0",
"Ran 1 test in *",
"FAILED (failures=2)",
]
)
else:
if runner == "pytest-normal":
result = testdir.runpytest(simple_script, "-v")
expected_lines = [
"*collected 1 item",
"test_simple_terminal_verbose.py::T::test_foo FAILED *100%*",
"test_simple_terminal_verbose.py::T::test_foo FAILED *100%*",
"test_simple_terminal_verbose.py::T::test_foo PASSED *100%*",
]
else:
pytest.importorskip("xdist")
result = testdir.runpytest(simple_script, "-n1", "-v")
expected_lines = [
"gw0 [1]",
"*gw0*100%* FAILED test_simple_terminal_verbose.py::T::test_foo*",
"*gw0*100%* FAILED test_simple_terminal_verbose.py::T::test_foo*",
"*gw0*100%* PASSED test_simple_terminal_verbose.py::T::test_foo*",
]
result.stdout.fnmatch_lines(
expected_lines
+ [
"* T.test_foo [[]custom[]] (i=1) *",
"E * AssertionError: 1 != 0",
"* T.test_foo [[]custom[]] (i=3) *",
"E * AssertionError: 1 != 0",
> "* 2 failed, 1 passed in *",
]
)
E Failed: nomatch: '*collected 1 item'
E and: 'Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)'
E and: 'cachedir: .pytest_cache'
E and: "hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')"
E and: 'rootdir: /tmp/pytest-of-fab/pytest-4/test_simple_terminal_verbose3'
E and: 'plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0'
E and: 'collecting ... '
E and: ''
E and: '―――――――――――――――――――――――――――――――――― T.test_foo ――――――――――――――――――――――――――――――――――'
E and: ''
E and: 'self = <test_simple_terminal_verbose.T testMethod=test_foo>'
E and: ''
E and: ' def test_foo(self):'
E and: ' for i in range(5):'
E and: ' with self.subTest(msg="custom", i=i):'
E and: '> self.assertEqual(i % 2, 0)'
E and: 'E AssertionError: 1 != 0'
E and: ''
E and: 'test_simple_terminal_verbose.py:8: AssertionError'
E and: '\r'
E and: '\r \x1b[36mtest_simple_terminal_verbose.py\x1b[0m::T.test_foo\x1b[0m \x1b[31m⨯\x1b[0m \x1b[31m100% \x1b[0m\x1b[40m\x1b[31m█\x1b[0m\x1b[40m\x1b[31m█████████\x1b[0m'
E and: '===Flaky Test Report==='
E and: ''
E and: ''
E and: '===End Flaky Test Report==='
E and: ''
E and: 'Results (0.08s):'
E and: '\x1b[31m 1 failed\x1b[0m'
E and: ' - \x1b[36m\x1b[0mtest_simple_terminal_verbose.py\x1b[0m:5 \x1b[31mT.test_foo\x1b[0m'
E and: ''
E remains unmatched: '*collected 1 item'
/home/fab/Documents/repos/pytest-subtests/tests/test_subtests.py:191: Failed
------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------
Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')
rootdir: /tmp/pytest-of-fab/pytest-4/test_simple_terminal_verbose3
plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0
collecting ...
―――――――――――――――――――――――――――――――――― T.test_foo ――――――――――――――――――――――――――――――――――
self = <test_simple_terminal_verbose.T testMethod=test_foo>
def test_foo(self):
for i in range(5):
with self.subTest(msg="custom", i=i):
> self.assertEqual(i % 2, 0)
E AssertionError: 1 != 0
test_simple_terminal_verbose.py:8: AssertionError
test_simple_terminal_verbose.py::T.test_foo ⨯ 100% ██████████
===Flaky Test Report===
===End Flaky Test Report===
Results (0.08s):
1 failed
- test_simple_terminal_verbose.py:5 T.test_foo
tests/test_subtests.py::TestSubTest.test_simple_terminal_verbose[pytest-normal] ⨯ 58% █████▊
tests/test_subtests.py::TestSubTest.test_simple_terminal_verbose[pytest-xdist] s 63% ██████▍
tests/test_subtests.py::TestSubTest.test_skip[unittest] ✓ 68% ██████▉
tests/test_subtests.py::TestSubTest.test_skip[pytest-normal] x 74% ███████▍
tests/test_subtests.py::TestSubTest.test_skip[pytest-xdist] x 79% ███████▉
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestCapture.test_capturing ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <test_subtests.TestCapture object at 0x7f12c14c03d0>, testdir = <Testdir local('/tmp/pytest-of-fab/pytest-4/test_capturing0')>
def test_capturing(self, testdir):
self.create_file(testdir)
result = testdir.runpytest()
result.stdout.fnmatch_lines(
[
"*__ test (i='A') __*",
"*Captured stdout call*",
"hello stdout A",
"*Captured stderr call*",
"hello stderr A",
"*__ test (i='B') __*",
"*Captured stdout call*",
"hello stdout B",
"*Captured stderr call*",
"hello stderr B",
"*__ test __*",
"*Captured stdout call*",
"start test",
> "end test",
]
)
E Failed: nomatch: "*__ test (i='A') __*"
E and: 'Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)'
E and: "hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')"
E and: 'rootdir: /tmp/pytest-of-fab/pytest-4/test_capturing0'
E and: 'plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0'
E and: ''
E and: ''
E and: '―――――――――――――――――――――――――――― ERROR at setup of test ――――――――――――――――――――――――――――'
E and: 'file /tmp/pytest-of-fab/pytest-4/test_capturing0/test_capturing.py, line 2'
E and: ' def test(subtests):'
E and: "E fixture 'subtests' not found"
E and: '> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave'
E and: "> use 'pytest --fixtures [testpath]' for help on them."
E and: ''
E and: '/tmp/pytest-of-fab/pytest-4/test_capturing0/test_capturing.py:2'
E and: '\r \x1b[32m100% \x1b[0m\x1b[40m██████████\x1b[0m'
E and: '===Flaky Test Report==='
E and: ''
E and: ''
E and: '===End Flaky Test Report==='
E and: ''
E and: 'Results (0.06s):'
E and: '\x1b[31m 1 error\x1b[0m'
E and: ''
E remains unmatched: "*__ test (i='A') __*"
/home/fab/Documents/repos/pytest-subtests/tests/test_subtests.py:266: Failed
------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------
Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')
rootdir: /tmp/pytest-of-fab/pytest-4/test_capturing0
plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0
―――――――――――――――――――――――――――― ERROR at setup of test ――――――――――――――――――――――――――――
file /tmp/pytest-of-fab/pytest-4/test_capturing0/test_capturing.py, line 2
def test(subtests):
E fixture 'subtests' not found
> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave
> use 'pytest --fixtures [testpath]' for help on them.
/tmp/pytest-of-fab/pytest-4/test_capturing0/test_capturing.py:2
100% ██████████
===Flaky Test Report===
===End Flaky Test Report===
Results (0.06s):
1 error
tests/test_subtests.py::TestCapture.test_capturing ⨯ 84% ████████▌
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestCapture.test_no_capture ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <test_subtests.TestCapture object at 0x7f12c14d5810>, testdir = <Testdir local('/tmp/pytest-of-fab/pytest-4/test_no_capture0')>
def test_no_capture(self, testdir):
self.create_file(testdir)
result = testdir.runpytest("-s")
result.stdout.fnmatch_lines(
[
"start test",
"hello stdout A",
"Fhello stdout B",
"Fend test",
"*__ test (i='A') __*",
"*__ test (i='B') __*",
> "*__ test __*",
]
)
E Failed: nomatch: 'start test'
E and: 'Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)'
E and: "hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')"
E and: 'rootdir: /tmp/pytest-of-fab/pytest-4/test_no_capture0'
E and: 'plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0'
E and: ''
E and: ''
E and: '―――――――――――――――――――――――――――― ERROR at setup of test ――――――――――――――――――――――――――――'
E and: 'file /tmp/pytest-of-fab/pytest-4/test_no_capture0/test_no_capture.py, line 2'
E and: ' def test(subtests):'
E and: "E fixture 'subtests' not found"
E and: '> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave'
E and: "> use 'pytest --fixtures [testpath]' for help on them."
E and: ''
E and: '/tmp/pytest-of-fab/pytest-4/test_no_capture0/test_no_capture.py:2'
E and: '\r \x1b[32m100% \x1b[0m\x1b[40m██████████\x1b[0m'
E and: '===Flaky Test Report==='
E and: ''
E and: ''
E and: '===End Flaky Test Report==='
E and: ''
E and: 'Results (0.06s):'
E and: '\x1b[31m 1 error\x1b[0m'
E and: ''
E remains unmatched: 'start test'
/home/fab/Documents/repos/pytest-subtests/tests/test_subtests.py:281: Failed
------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------
Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')
rootdir: /tmp/pytest-of-fab/pytest-4/test_no_capture0
plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0
―――――――――――――――――――――――――――― ERROR at setup of test ――――――――――――――――――――――――――――
file /tmp/pytest-of-fab/pytest-4/test_no_capture0/test_no_capture.py, line 2
def test(subtests):
E fixture 'subtests' not found
> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave
> use 'pytest --fixtures [testpath]' for help on them.
/tmp/pytest-of-fab/pytest-4/test_no_capture0/test_no_capture.py:2
100% ██████████
===Flaky Test Report===
===End Flaky Test Report===
Results (0.06s):
1 error
tests/test_subtests.py::TestCapture.test_no_capture ⨯ 89% ████████▉
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestCapture.test_capture_with_fixture[capsys] ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <test_subtests.TestCapture object at 0x7f12c1372ad0>, testdir = <Testdir local('/tmp/pytest-of-fab/pytest-4/test_capture_with_fixture0')>, fixture = 'capsys'
@pytest.mark.parametrize("fixture", ["capsys", "capfd"])
def test_capture_with_fixture(self, testdir, fixture):
testdir.makepyfile(
r"""
import sys
def test(subtests, {fixture}):
print('start test')
with subtests.test(i='A'):
print("hello stdout A")
print("hello stderr A", file=sys.stderr)
out, err = {fixture}.readouterr()
assert out == 'start test\nhello stdout A\n'
assert err == 'hello stderr A\n'
""".format(
fixture=fixture
)
)
result = testdir.runpytest()
result.stdout.fnmatch_lines(
> ["*1 passed*",]
)
E Failed: nomatch: '*1 passed*'
E and: 'Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)'
E and: "hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')"
E and: 'rootdir: /tmp/pytest-of-fab/pytest-4/test_capture_with_fixture0'
E and: 'plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0'
E and: ''
E and: ''
E and: '―――――――――――――――――――――――――――― ERROR at setup of test ――――――――――――――――――――――――――――'
E and: 'file /tmp/pytest-of-fab/pytest-4/test_capture_with_fixture0/test_capture_with_fixture.py, line 3'
E and: ' def test(subtests, capsys):'
E and: "E fixture 'subtests' not found"
E and: '> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave'
E and: "> use 'pytest --fixtures [testpath]' for help on them."
E and: ''
E and: '/tmp/pytest-of-fab/pytest-4/test_capture_with_fixture0/test_capture_with_fixture.py:3'
E and: '\r \x1b[32m100% \x1b[0m\x1b[40m██████████\x1b[0m'
E and: '===Flaky Test Report==='
E and: ''
E and: ''
E and: '===End Flaky Test Report==='
E and: ''
E and: 'Results (0.06s):'
E and: '\x1b[31m 1 error\x1b[0m'
E and: ''
E remains unmatched: '*1 passed*'
/home/fab/Documents/repos/pytest-subtests/tests/test_subtests.py:308: Failed
------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------
Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')
rootdir: /tmp/pytest-of-fab/pytest-4/test_capture_with_fixture0
plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0
―――――――――――――――――――――――――――― ERROR at setup of test ――――――――――――――――――――――――――――
file /tmp/pytest-of-fab/pytest-4/test_capture_with_fixture0/test_capture_with_fixture.py, line 3
def test(subtests, capsys):
E fixture 'subtests' not found
> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave
> use 'pytest --fixtures [testpath]' for help on them.
/tmp/pytest-of-fab/pytest-4/test_capture_with_fixture0/test_capture_with_fixture.py:3
100% ██████████
===Flaky Test Report===
===End Flaky Test Report===
Results (0.06s):
1 error
tests/test_subtests.py::TestCapture.test_capture_with_fixture[capsys] ⨯ 95% █████████▌
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― TestCapture.test_capture_with_fixture[capfd] ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
self = <test_subtests.TestCapture object at 0x7f12c1372210>, testdir = <Testdir local('/tmp/pytest-of-fab/pytest-4/test_capture_with_fixture1')>, fixture = 'capfd'
@pytest.mark.parametrize("fixture", ["capsys", "capfd"])
def test_capture_with_fixture(self, testdir, fixture):
testdir.makepyfile(
r"""
import sys
def test(subtests, {fixture}):
print('start test')
with subtests.test(i='A'):
print("hello stdout A")
print("hello stderr A", file=sys.stderr)
out, err = {fixture}.readouterr()
assert out == 'start test\nhello stdout A\n'
assert err == 'hello stderr A\n'
""".format(
fixture=fixture
)
)
result = testdir.runpytest()
result.stdout.fnmatch_lines(
> ["*1 passed*",]
)
E Failed: nomatch: '*1 passed*'
E and: 'Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)'
E and: "hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')"
E and: 'rootdir: /tmp/pytest-of-fab/pytest-4/test_capture_with_fixture1'
E and: 'plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0'
E and: ''
E and: ''
E and: '―――――――――――――――――――――――――――― ERROR at setup of test ――――――――――――――――――――――――――――'
E and: 'file /tmp/pytest-of-fab/pytest-4/test_capture_with_fixture1/test_capture_with_fixture.py, line 3'
E and: ' def test(subtests, capfd):'
E and: "E fixture 'subtests' not found"
E and: '> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave'
E and: "> use 'pytest --fixtures [testpath]' for help on them."
E and: ''
E and: '/tmp/pytest-of-fab/pytest-4/test_capture_with_fixture1/test_capture_with_fixture.py:3'
E and: '\r \x1b[32m100% \x1b[0m\x1b[40m██████████\x1b[0m'
E and: '===Flaky Test Report==='
E and: ''
E and: ''
E and: '===End Flaky Test Report==='
E and: ''
E and: 'Results (0.04s):'
E and: '\x1b[31m 1 error\x1b[0m'
E and: ''
E remains unmatched: '*1 passed*'
/home/fab/Documents/repos/pytest-subtests/tests/test_subtests.py:308: Failed
------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------
Test session starts (platform: linux, Python 3.7.6, pytest 4.6.9, pytest-sugar 0.9.2)
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/fab/Documents/repos/pytest-subtests/.hypothesis/examples')
rootdir: /tmp/pytest-of-fab/pytest-4/test_capture_with_fixture1
plugins: hypothesis-4.23.8, requests-mock-1.7.0, case-1.5.3, sugar-0.9.2, betamax-0.8.1, asyncio-0.10.0, toolbox-0.4, timeout-1.3.3, cov-2.8.1, isort-0.3.1, forked-1.0.2, datafiles-2.0, vcr-1.0.2, aspectlib-1.4.2, mock-1.10.4, trio-0.5.2, flaky-3.5.3, django-3.7.0
―――――――――――――――――――――――――――― ERROR at setup of test ――――――――――――――――――――――――――――
file /tmp/pytest-of-fab/pytest-4/test_capture_with_fixture1/test_capture_with_fixture.py, line 3
def test(subtests, capfd):
E fixture 'subtests' not found
> available fixtures: _dj_autoclear_mailbox, _django_clear_site_cache, _django_db_marker, _django_set_urlconf, _django_setup_unittest, _fail_for_invalid_template_variable, _live_server_helper, _template_string_if_invalid_marker, _vcr_marker, admin_client, admin_user, autojump_clock, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, client, cov, datafiles, db, django_assert_max_num_queries, django_assert_num_queries, django_db_blocker, django_db_createdb, django_db_keepdb, django_db_modify_db_settings, django_db_modify_db_settings_parallel_suffix, django_db_modify_db_settings_tox_suffix, django_db_modify_db_settings_xdist_suffix, django_db_reset_sequences, django_db_setup, django_db_use_migrations, django_mail_dnsname, django_mail_patch_dns, django_test_environment, django_user_model, django_username_field, doctest_namespace, event_loop, live_server, loop, mailoutbox, mock, mock_clock, mocker, monkeypatch, no_cover, nursery, patching, print_logs, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, rf, settings, smart_caplog, stdouts, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, transactional_db, unused_tcp_port, unused_tcp_port_factory, vcr, vcr_cassette, vcr_cassette_dir, vcr_cassette_name, vcr_config, weave
> use 'pytest --fixtures [testpath]' for help on them.
/tmp/pytest-of-fab/pytest-4/test_capture_with_fixture1/test_capture_with_fixture.py:3
100% ██████████
===Flaky Test Report===
===End Flaky Test Report===
Results (0.04s):
1 error
tests/test_subtests.py::TestCapture.test_capture_with_fixture[capfd] ⨯ 100% ██████████
===Flaky Test Report===
===End Flaky Test Report===
Results (6.78s):
3 passed
9 failed
- tests/test_subtests.py:23 TestFixture.test_simple_terminal_normal[normal]
- tests/test_subtests.py:39 TestFixture.test_simple_terminal_verbose[normal]
- tests/test_subtests.py:71 TestFixture.test_skip[normal]
- tests/test_subtests.py:116 TestSubTest.test_simple_terminal_normal[pytest-normal]
- tests/test_subtests.py:150 TestSubTest.test_simple_terminal_verbose[pytest-normal]
- tests/test_subtests.py:248 TestCapture.test_capturing
- tests/test_subtests.py:270 TestCapture.test_no_capture
- tests/test_subtests.py:286 TestCapture.test_capture_with_fixture[capsys]
- tests/test_subtests.py:286 TestCapture.test_capture_with_fixture[capfd]
2 xfailed
5 skipped