Testsuite is not a package

This commit is contained in:
Markus Unterwaditzer 2014-09-06 02:20:00 +02:00
parent 56db3ddf4e
commit 192da325f8
4 changed files with 34 additions and 95 deletions

View file

@ -125,3 +125,10 @@ def purge_module(request):
def inner(name):
request.addfinalizer(lambda: sys.modules.pop(name, None))
return inner
@pytest.fixture
def catch_deprecation_warnings():
import warnings
warnings.simplefilter('default', category=DeprecationWarning)
return lambda: warnings.catch_warnings(record=True)