summaryrefslogtreecommitdiff
path: root/numpy/tests/test_scripts.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2016-01-02 08:34:54 -0700
committerCharles Harris <charlesr.harris@gmail.com>2016-01-02 08:34:54 -0700
commit9bd67153c6efab990b33ff34342b7782256de1f9 (patch)
tree287a4129443eb75f8c7ec7cef46104b635d22d5c /numpy/tests/test_scripts.py
parent22c84f5ea585645b458b1ed0ca31d739cf3085c6 (diff)
parente89d9bb2e16c1746ce234b81aff4731277b31ddd (diff)
downloadnumpy-9bd67153c6efab990b33ff34342b7782256de1f9.tar.gz
Merge pull request #6886 from charris/use-temppath
MAINT: Simplify some tests using temppath context manager.
Diffstat (limited to 'numpy/tests/test_scripts.py')
-rw-r--r--numpy/tests/test_scripts.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/numpy/tests/test_scripts.py b/numpy/tests/test_scripts.py
index 434f17a4a..94587e807 100644
--- a/numpy/tests/test_scripts.py
+++ b/numpy/tests/test_scripts.py
@@ -14,7 +14,7 @@ from nose.tools import assert_equal
from numpy.testing.decorators import skipif
from numpy.testing import assert_
-skipif_inplace = skipif(isfile(pathjoin(dirname(np.__file__), '..', 'setup.py')))
+is_inplace = isfile(pathjoin(dirname(np.__file__), '..', 'setup.py'))
def run_command(cmd, check_code=True):
""" Run command sequence `cmd` returning exit code, stdout, stderr
@@ -58,7 +58,7 @@ def run_command(cmd, check_code=True):
return proc.returncode, stdout, stderr
-@skipif_inplace
+@skipif(is_inplace)
def test_f2py():
# test that we can run f2py script
if sys.platform == 'win32':
@@ -79,4 +79,5 @@ def test_f2py():
break
except:
pass
- assert_(success, "Warning: neither %s nor %s found in path" % f2py_cmds)
+ msg = "Warning: neither %s nor %s found in path" % f2py_cmds
+ assert_(success, msg)