summaryrefslogtreecommitdiff
path: root/tests/testutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testutils.py')
-rw-r--r--tests/testutils.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/testutils.py b/tests/testutils.py
index 9347735..d63dc00 100644
--- a/tests/testutils.py
+++ b/tests/testutils.py
@@ -50,7 +50,9 @@ else:
@wraps(f)
def skipIf__(self):
if cond:
- warnings.warn(msg)
+ with warnings.catch_warnings():
+ warnings.simplefilter('always', UserWarning)
+ warnings.warn(msg)
return
else:
return f(self)
@@ -61,7 +63,9 @@ else:
return skipIf(True, msg)
def skipTest(self, msg):
- warnings.warn(msg)
+ with warnings.catch_warnings():
+ warnings.simplefilter('always', UserWarning)
+ warnings.warn(msg)
return
unittest.TestCase.skipTest = skipTest