From 284a2d110fa840610cfa6e05ec69e37ce31587cb Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 4 Sep 2018 13:46:33 -0300 Subject: [PATCH] Move warnings import to top level --- src/_pytest/cacheprovider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/cacheprovider.py b/src/_pytest/cacheprovider.py index dbe953406..f27a04549 100755 --- a/src/_pytest/cacheprovider.py +++ b/src/_pytest/cacheprovider.py @@ -6,6 +6,7 @@ ignores the external pytest-cache """ from __future__ import absolute_import, division, print_function from collections import OrderedDict +import warnings import py import six @@ -47,7 +48,6 @@ class Cache(object): return paths.resolve_from_str(config.getini("cache_dir"), config.rootdir) def warn(self, fmt, **args): - import warnings from _pytest.warning_types import PytestWarning warnings.warn(