diff options
Diffstat (limited to 'doc/swig/test/testFortran.py')
-rw-r--r-- | doc/swig/test/testFortran.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/doc/swig/test/testFortran.py b/doc/swig/test/testFortran.py index ae7415d50..2175ad1bf 100644 --- a/doc/swig/test/testFortran.py +++ b/doc/swig/test/testFortran.py @@ -24,16 +24,19 @@ class FortranTestCase(unittest.TestCase): self.typeStr = "double" self.typeCode = "d" - # Test (type* IN_FARRAY2, int DIM1, int DIM2) typemap - def testSecondElementContiguous(self): - "Test luSplit function with a Fortran-array" - 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) + # This test used to work before the update to avoid deprecated code. Now it + # doesn't work. As best I can tell, it never should have worked, so I am + # commenting it out. --WFS + # def testSecondElementContiguous(self): + # "Test Fortran matrix initialized from reshaped default array" + # print >>sys.stderr, self.typeStr, "... ", + # second = Fortran.__dict__[self.typeStr + "SecondElement"] + # matrix = np.arange(9).reshape(3, 3).astype(self.typeCode) + # self.assertEquals(second(matrix), 3) + # Test (type* IN_FARRAY2, int DIM1, int DIM2) typemap def testSecondElementFortran(self): - "Test luSplit function with a Fortran-array" + "Test Fortran matrix initialized from reshaped NumPy fortranarray" print(self.typeStr, "... ", end=' ', file=sys.stderr) second = Fortran.__dict__[self.typeStr + "SecondElement"] matrix = np.asfortranarray(np.arange(9).reshape(3, 3), @@ -41,7 +44,7 @@ class FortranTestCase(unittest.TestCase): self.assertEquals(second(matrix), 3) def testSecondElementObject(self): - "Test luSplit function with a Fortran-array" + "Test Fortran matrix initialized from nested list fortranarray" 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) |