From 1f1d4aaf6881dd40e69a0388d42b78b072ba4e8c Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 30 Oct 2018 22:59:11 +0100 Subject: [PATCH 1/2] cacheprovider: display cachedir also in non-verbose mode if customized --- src/_pytest/cacheprovider.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_pytest/cacheprovider.py b/src/_pytest/cacheprovider.py index 8e7f7a804..a78d857f6 100755 --- a/src/_pytest/cacheprovider.py +++ b/src/_pytest/cacheprovider.py @@ -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 From f8a2452247266c25947901073db5a1490fa9dcac Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 1 Nov 2018 15:53:25 +0100 Subject: [PATCH 2/2] changelog [ci skip] --- changelog/4272.trivial.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/4272.trivial.rst diff --git a/changelog/4272.trivial.rst b/changelog/4272.trivial.rst new file mode 100644 index 000000000..4709f141d --- /dev/null +++ b/changelog/4272.trivial.rst @@ -0,0 +1 @@ +Display cachedir also in non-verbose mode if non-default.