Fix crash if --cache-show and --help are passed at the same time

Closes #10592

(cherry picked from commit 4d4ed42c34)
This commit is contained in:
Ramsey
2023-01-19 20:44:57 +08:00
committed by Bruno Oliveira
parent 94c05bc2a4
commit 5bf361f24e
4 changed files with 9 additions and 2 deletions

View File

@@ -1249,3 +1249,8 @@ def test_cachedir_tag(pytester: Pytester) -> None:
cache.set("foo", "bar")
cachedir_tag_path = cache._cachedir.joinpath("CACHEDIR.TAG")
assert cachedir_tag_path.read_bytes() == CACHEDIR_TAG_CONTENT
def test_clioption_with_cacheshow_and_help(pytester: Pytester) -> None:
result = pytester.runpytest("--cache-show", "--help")
assert result.ret == 0