diff --git a/testing/test_cacheprovider.py b/testing/test_cacheprovider.py index 86bd65810..23ec73599 100644 --- a/testing/test_cacheprovider.py +++ b/testing/test_cacheprovider.py @@ -553,19 +553,6 @@ class TestLastFailed(object): testdir.runpytest("-q", "--lf") assert os.path.exists(".pytest_cache/v/cache/lastfailed") - @pytest.mark.parametrize("quiet", [True, False]) - @pytest.mark.parametrize("opt", ["--ff", "--lf"]) - def test_lf_and_ff_obey_verbosity(self, quiet, opt, testdir): - testdir.makepyfile("def test(): pass") - args = [opt] - if quiet: - args.append("-q") - result = testdir.runpytest(*args) - if quiet: - assert "run all" not in result.stdout.str() - else: - assert "run all" in result.stdout.str() - def test_xfail_not_considered_failure(self, testdir): testdir.makepyfile( """ @@ -628,13 +615,19 @@ class TestLastFailed(object): @pytest.mark.parametrize("opt", ["--ff", "--lf"]) def test_lf_and_ff_prints_no_needless_message(self, quiet, opt, testdir): # Issue 3853 - testdir.makepyfile("def test(): pass") + testdir.makepyfile("def test(): assert 0") args = [opt] if quiet: args.append("-q") result = testdir.runpytest(*args) assert "run all" not in result.stdout.str() + result = testdir.runpytest(*args) + if quiet: + assert "run all" not in result.stdout.str() + else: + assert "rerun previous" in result.stdout.str() + def get_cached_last_failed(self, testdir): config = testdir.parseconfigure() return sorted(config.cache.get("cache/lastfailed", {}))