diff --git a/testing/test_cacheprovider.py b/testing/test_cacheprovider.py index f0b279abf31..e22c1c76642 100644 --- a/testing/test_cacheprovider.py +++ b/testing/test_cacheprovider.py @@ -268,9 +268,11 @@ def test_3(): assert 0 "*1 failed*2 passed*", ] ) + testdir.tmpdir.join(".pytest_cache").mkdir(".git") result = testdir.runpytest(str(p), "--lf", "--cache-clear") result.stdout.fnmatch_lines(["*1 failed*2 passed*"]) assert testdir.tmpdir.join(".pytest_cache", "README.md").isfile() + assert testdir.tmpdir.join(".pytest_cache", ".git").isdir() # Run this again to make sure clear-cache is robust if os.path.isdir(".pytest_cache"):