Merge pull request #4272 from blueyed/cache-non-default

cacheprovider: display cachedir also in non-verbose mode if customized
This commit is contained in:
Bruno Oliveira 2018-11-01 12:19:21 -03:00 committed by GitHub
commit f2cebce2eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1 @@
Display cachedir also in non-verbose mode if non-default.

View File

@ -319,7 +319,8 @@ def cache(request):
def pytest_report_header(config):
if config.option.verbose:
"""Display cachedir with --cache-show and if non-default."""
if config.option.verbose or config.getini("cache_dir") != ".pytest_cache":
cachedir = config.cache._cachedir
# TODO: evaluate generating upward relative paths
# starting with .., ../.. if sensible