Move warnings import to top level

This commit is contained in:
Bruno Oliveira 2018-09-04 13:46:33 -03:00
parent 9ae0a3cd85
commit 284a2d110f
1 changed files with 1 additions and 1 deletions

View File

@ -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(