Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--cache-clear: add test for keeping non-supporting files #6532

Merged
merged 1 commit into from Jan 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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