Use new no-match functions to replace previous idiom

This commit is contained in:
Bruno Oliveira
2019-10-05 14:18:51 -03:00
parent 0c18e24433
commit 47c2091ecd
21 changed files with 77 additions and 76 deletions

View File

@@ -327,7 +327,7 @@ class TestLastFailed:
result = testdir.runpytest("--lf", "--ff")
# Test order will be failing tests firs
result.stdout.fnmatch_lines(["test_b.py*"])
assert "test_a.py" not in result.stdout.str()
result.stdout.no_fnmatch_line("*test_a.py*")
def test_lastfailed_difference_invocations(self, testdir, monkeypatch):
monkeypatch.setenv("PYTHONDONTWRITEBYTECODE", "1")
@@ -660,11 +660,11 @@ class TestLastFailed:
if quiet:
args.append("-q")
result = testdir.runpytest(*args)
assert "run all" not in result.stdout.str()
result.stdout.no_fnmatch_line("*run all*")
result = testdir.runpytest(*args)
if quiet:
assert "run all" not in result.stdout.str()
result.stdout.no_fnmatch_line("*run all*")
else:
assert "rerun previous" in result.stdout.str()