Use new no-match functions to replace previous idiom
This commit is contained in:
@@ -1139,7 +1139,7 @@ def test_unorderable_types(testdir):
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest()
|
||||
assert "TypeError" not in result.stdout.str()
|
||||
result.stdout.no_fnmatch_line("*TypeError*")
|
||||
assert result.ret == ExitCode.NO_TESTS_COLLECTED
|
||||
|
||||
|
||||
|
||||
@@ -455,7 +455,7 @@ class TestFillFixtures:
|
||||
"*1 error*",
|
||||
]
|
||||
)
|
||||
assert "INTERNAL" not in result.stdout.str()
|
||||
result.stdout.no_fnmatch_line("*INTERNAL*")
|
||||
|
||||
def test_fixture_excinfo_leak(self, testdir):
|
||||
# on python2 sys.excinfo would leak into fixture executions
|
||||
@@ -2647,7 +2647,7 @@ class TestFixtureMarker:
|
||||
*3 passed*
|
||||
"""
|
||||
)
|
||||
assert "error" not in result.stdout.str()
|
||||
result.stdout.no_fnmatch_line("*error*")
|
||||
|
||||
def test_fixture_finalizer(self, testdir):
|
||||
testdir.makeconftest(
|
||||
@@ -3151,7 +3151,7 @@ class TestShowFixtures:
|
||||
*hello world*
|
||||
"""
|
||||
)
|
||||
assert "arg0" not in result.stdout.str()
|
||||
result.stdout.no_fnmatch_line("*arg0*")
|
||||
|
||||
@pytest.mark.parametrize("testmod", [True, False])
|
||||
def test_show_fixtures_conftest(self, testdir, testmod):
|
||||
|
||||
@@ -27,7 +27,7 @@ def test_show_only_active_fixtures(testdir, mode, dummy_yaml_custom_test):
|
||||
result.stdout.fnmatch_lines(
|
||||
["*SETUP F arg1*", "*test_arg1 (fixtures used: arg1)*", "*TEARDOWN F arg1*"]
|
||||
)
|
||||
assert "_arg0" not in result.stdout.str()
|
||||
result.stdout.no_fnmatch_line("*_arg0*")
|
||||
|
||||
|
||||
def test_show_different_scopes(testdir, mode):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
def test_no_items_should_not_show_output(testdir):
|
||||
result = testdir.runpytest("--fixtures-per-test")
|
||||
assert "fixtures used by" not in result.stdout.str()
|
||||
result.stdout.no_fnmatch_line("*fixtures used by*")
|
||||
assert result.ret == 0
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ def test_fixtures_in_module(testdir):
|
||||
" arg1 docstring",
|
||||
]
|
||||
)
|
||||
assert "_arg0" not in result.stdout.str()
|
||||
result.stdout.no_fnmatch_line("*_arg0*")
|
||||
|
||||
|
||||
def test_fixtures_in_conftest(testdir):
|
||||
|
||||
Reference in New Issue
Block a user