s/--cache/--show-cache/

This commit is contained in:
Ronny Pfannschmidt 2015-07-24 09:59:59 +02:00
parent e20216a1a8
commit e035f57535
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ import json
from os.path import sep as _sep, altsep as _altsep from os.path import sep as _sep, altsep as _altsep
class Cache: class Cache(object):
def __init__(self, config): def __init__(self, config):
self.config = config self.config = config
self._cachedir = config.rootdir.join(".cache") self._cachedir = config.rootdir.join(".cache")
@ -152,7 +152,7 @@ def pytest_addoption(parser):
"This may re-order tests and thus lead to " "This may re-order tests and thus lead to "
"repeated fixture setup/teardown") "repeated fixture setup/teardown")
group.addoption( group.addoption(
'--cache', action='store_true', dest="showcache", '--show-cache', action='store_true', dest="showcache",
help="show cache contents, don't perform collection or tests") help="show cache contents, don't perform collection or tests")
group.addoption( group.addoption(
'--clearcache', action='store_true', dest="clearcache", '--clearcache', action='store_true', dest="clearcache",

View File

@ -67,7 +67,7 @@ def test_cache_reportheader(testdir):
]) ])
def test_cache_show(testdir): def test_cache_show(testdir):
result = testdir.runpytest("--cache") result = testdir.runpytest("--show-cache")
assert result.ret == 0 assert result.ret == 0
result.stdout.fnmatch_lines([ result.stdout.fnmatch_lines([
"*cache is empty*" "*cache is empty*"
@ -82,7 +82,7 @@ def test_cache_show(testdir):
""") """)
result = testdir.runpytest() result = testdir.runpytest()
assert result.ret == 0 assert result.ret == 0
result = testdir.runpytest("--cache") result = testdir.runpytest("--show-cache")
result.stdout.fnmatch_lines_random([ result.stdout.fnmatch_lines_random([
"*cachedir:*", "*cachedir:*",
"-*cache values*-", "-*cache values*-",