diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2019-10-06 20:27:20 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-06 20:27:20 -0300 |
commit | 5186635387679a0f1eeb76362b840411f25417a4 (patch) | |
tree | b104aabf8d65f7076e795afccaf40bbab2101c2a /testing/acceptance_test.py | |
parent | cd398e289f48b75b5e785d581385e4c40497cfc3 (diff) | |
parent | 47c2091ecd2f341e10f38f1d505c21fb3323c140 (diff) | |
download | pytest-5186635387679a0f1eeb76362b840411f25417a4.tar.gz |
Introduce no_fnmatch_line/no_re_match_line in pytester (#5914)
Introduce no_fnmatch_line/no_re_match_line in pytester
Diffstat (limited to 'testing/acceptance_test.py')
-rw-r--r-- | testing/acceptance_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 1b11a8af0..a5187644d 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -246,7 +246,7 @@ class TestGeneralUsage: ) result = testdir.runpytest() assert result.ret == ExitCode.NO_TESTS_COLLECTED - assert "should not be seen" not in result.stdout.str() + result.stdout.no_fnmatch_line("*should not be seen*") assert "stderr42" not in result.stderr.str() def test_conftest_printing_shows_if_error(self, testdir): @@ -954,7 +954,7 @@ class TestDurations: result.stdout.fnmatch_lines(["*Interrupted: 1 errors during collection*"]) # Collection errors abort test execution, therefore no duration is # output - assert "duration" not in result.stdout.str() + result.stdout.no_fnmatch_line("*duration*") def test_with_not(self, testdir): testdir.makepyfile(self.source) @@ -1008,7 +1008,7 @@ def test_zipimport_hook(testdir, tmpdir): result = testdir.runpython(target) assert result.ret == 0 result.stderr.fnmatch_lines(["*not found*foo*"]) - assert "INTERNALERROR>" not in result.stdout.str() + result.stdout.no_fnmatch_line("*INTERNALERROR>*") def test_import_plugin_unicode_name(testdir): |