From 02e742b7a6d7a9060309385367ff9746cea3efb5 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 4 Aug 2015 19:27:13 -0300 Subject: [PATCH] Move WarningsChecker import in test to a local import to workaround flakes issue See #897 for discussion --- testing/test_recwarn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/test_recwarn.py b/testing/test_recwarn.py index ad89c9cd4..829a63092 100644 --- a/testing/test_recwarn.py +++ b/testing/test_recwarn.py @@ -1,7 +1,7 @@ import warnings import py import pytest -from _pytest.recwarn import WarningsChecker, WarningsRecorder +from _pytest.recwarn import WarningsRecorder def test_recwarn_functional(testdir): @@ -42,6 +42,7 @@ class TestWarningsRecorderChecker(object): assert showwarning == py.std.warnings.showwarning def test_typechecking(self): + from _pytest.recwarn import WarningsChecker with pytest.raises(TypeError): WarningsChecker(5) with pytest.raises(TypeError):