summaryrefslogtreecommitdiff
path: root/numpy/testing/tests/test_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/testing/tests/test_utils.py')
-rw-r--r--numpy/testing/tests/test_utils.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py
index b558270b3..23bd491bc 100644
--- a/numpy/testing/tests/test_utils.py
+++ b/numpy/testing/tests/test_utils.py
@@ -788,11 +788,13 @@ def test_tempdir():
pass
assert_(not os.path.isdir(tdir))
+ raised = False
try:
with tempdir() as tdir:
raise ValueError()
except ValueError:
- pass
+ raised = True
+ assert_(raised)
assert_(not os.path.isdir(tdir))
@@ -803,11 +805,13 @@ def test_temppath():
pass
assert_(not os.path.isfile(fpath))
+ raised = False
try:
with temppath() as fpath:
raise ValueError()
except ValueError:
- pass
+ raised = True
+ assert_(raised)
assert_(not os.path.isfile(fpath))