Skip to content

Commit

Permalink
--cache-clear: add test for keeping non-supporting files
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Jan 21, 2020
1 parent a52f791 commit 8f5fd53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions testing/test_cacheprovider.py
Expand Up @@ -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"):
Expand Down

0 comments on commit 8f5fd53

Please sign in to comment.