summaryrefslogtreecommitdiff
path: root/doc/swig/test/testFortran.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/swig/test/testFortran.py')
-rw-r--r--doc/swig/test/testFortran.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/swig/test/testFortran.py b/doc/swig/test/testFortran.py
index 499f6a439..ae7415d50 100644
--- a/doc/swig/test/testFortran.py
+++ b/doc/swig/test/testFortran.py
@@ -1,5 +1,5 @@
#! /usr/bin/env python
-from __future__ import division, absolute_import
+from __future__ import division, absolute_import, print_function
# System imports
from distutils.util import get_platform
@@ -27,14 +27,14 @@ class FortranTestCase(unittest.TestCase):
# Test (type* IN_FARRAY2, int DIM1, int DIM2) typemap
def testSecondElementContiguous(self):
"Test luSplit function with a Fortran-array"
- print >>sys.stderr, self.typeStr, "... ",
+ print(self.typeStr, "... ", end=' ', file=sys.stderr)
second = Fortran.__dict__[self.typeStr + "SecondElement"]
matrix = np.arange(9).reshape(3, 3).astype(self.typeCode)
self.assertEquals(second(matrix), 3)
def testSecondElementFortran(self):
"Test luSplit function with a Fortran-array"
- print >>sys.stderr, self.typeStr, "... ",
+ print(self.typeStr, "... ", end=' ', file=sys.stderr)
second = Fortran.__dict__[self.typeStr + "SecondElement"]
matrix = np.asfortranarray(np.arange(9).reshape(3, 3),
self.typeCode)
@@ -42,7 +42,7 @@ class FortranTestCase(unittest.TestCase):
def testSecondElementObject(self):
"Test luSplit function with a Fortran-array"
- print >>sys.stderr, self.typeStr, "... ",
+ print(self.typeStr, "... ", end=' ', file=sys.stderr)
second = Fortran.__dict__[self.typeStr + "SecondElement"]
matrix = np.asfortranarray([[0,1,2],[3,4,5],[6,7,8]], self.typeCode)
self.assertEquals(second(matrix), 3)
@@ -163,8 +163,8 @@ if __name__ == "__main__":
suite.addTest(unittest.makeSuite( doubleTestCase))
# Execute the test suite
- print "Testing 2D Functions of Module Matrix"
- print "NumPy version", np.__version__
- print
+ print("Testing 2D Functions of Module Matrix")
+ print("NumPy version", np.__version__)
+ print()
result = unittest.TextTestRunner(verbosity=2).run(suite)
sys.exit(len(result.errors) + len(result.failures))