Skip to content

Commit

Permalink
Merge pull request #6532 from blueyed/harden-test
Browse files Browse the repository at this point in the history
--cache-clear: add test for keeping non-supporting files
  • Loading branch information
blueyed committed Jan 22, 2020
2 parents 1cd4baf + 8f5fd53 commit 0f78ef8
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 0f78ef8

Please sign in to comment.