diff --git a/src/_pytest/cacheprovider.py b/src/_pytest/cacheprovider.py index 5b4dbc381..b141d73a5 100755 --- a/src/_pytest/cacheprovider.py +++ b/src/_pytest/cacheprovider.py @@ -27,6 +27,8 @@ log = logging.getLogger(__name__) @attr.s class Cache(object): + _cachedir = attr.ib(repr=False) + @classmethod def for_config(cls, config): cachedir = cls.cache_dir_from_config(config) @@ -35,8 +37,6 @@ class Cache(object): cachedir.mkdir() return cls(cachedir) - _cachedir = attr.ib(repr=False) - @staticmethod def cache_dir_from_config(config): return paths.resolve_from_str(config.getini("cache_dir"), config.rootdir)