summaryrefslogtreecommitdiff
path: root/numpy/tests
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-04-06 13:25:26 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-04-06 13:25:26 -0600
commitbb726ca19f434f5055c0efceefe48d89469fcbbe (patch)
tree889782afaf67fd5acb5f222969251871c0c46e5a /numpy/tests
parent7441fa50523f5b4a16c854bf004d675e5bd86ab8 (diff)
downloadnumpy-bb726ca19f434f5055c0efceefe48d89469fcbbe.tar.gz
2to3: Apply `print` fixer.
Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
Diffstat (limited to 'numpy/tests')
-rw-r--r--numpy/tests/test_ctypeslib.py8
-rw-r--r--numpy/tests/test_matlib.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/numpy/tests/test_ctypeslib.py b/numpy/tests/test_ctypeslib.py
index cbf8db6a3..ee36e0a9b 100644
--- a/numpy/tests/test_ctypeslib.py
+++ b/numpy/tests/test_ctypeslib.py
@@ -1,4 +1,4 @@
-from __future__ import division, absolute_import
+from __future__ import division, absolute_import, print_function
import sys
@@ -23,7 +23,7 @@ class TestLoadLibrary(TestCase):
except ImportError as e:
msg = "ctypes is not available on this python: skipping the test" \
" (import error was: %s)" % str(e)
- print msg
+ print(msg)
@dec.skipif(not _HAS_CTYPE, "ctypes not available on this python installation")
@dec.knownfailureif(sys.platform=='cygwin', "This test is known to fail on cygwin")
@@ -36,11 +36,11 @@ class TestLoadLibrary(TestCase):
cdll = load_library('multiarray%s' % so,
np.core.multiarray.__file__)
except ImportError:
- print "No distutils available, skipping test."
+ print("No distutils available, skipping test.")
except ImportError as e:
msg = "ctypes is not available on this python: skipping the test" \
" (import error was: %s)" % str(e)
- print msg
+ print(msg)
class TestNdpointer(TestCase):
def test_dtype(self):
diff --git a/numpy/tests/test_matlib.py b/numpy/tests/test_matlib.py
index 621563462..814c24b0c 100644
--- a/numpy/tests/test_matlib.py
+++ b/numpy/tests/test_matlib.py
@@ -1,4 +1,4 @@
-from __future__ import division, absolute_import
+from __future__ import division, absolute_import, print_function
import numpy as np
import numpy.matlib