diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-04-06 13:25:26 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-04-06 13:25:26 -0600 |
commit | bb726ca19f434f5055c0efceefe48d89469fcbbe (patch) | |
tree | 889782afaf67fd5acb5f222969251871c0c46e5a /doc/swig/test/testFortran.py | |
parent | 7441fa50523f5b4a16c854bf004d675e5bd86ab8 (diff) | |
download | numpy-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 'doc/swig/test/testFortran.py')
-rw-r--r-- | doc/swig/test/testFortran.py | 14 |
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)) |