Test eoSplit function
(self)
| 218 | |
| 219 | # Test the (type ARGOUT_ARRAY1[ANY]) typemap |
| 220 | def testEOSplit(self): |
| 221 | "Test eoSplit function" |
| 222 | print(self.typeStr, "... ", end=' ', file=sys.stderr) |
| 223 | eoSplit = Vector.__dict__[self.typeStr + "EOSplit"] |
| 224 | even, odd = eoSplit([1, 2, 3]) |
| 225 | self.assertEqual((even == [1, 0, 3]).all(), True) |
| 226 | self.assertEqual((odd == [0, 2, 0]).all(), True) |
| 227 | |
| 228 | # Test the (type* ARGOUT_ARRAY1, int DIM1) typemap |
| 229 | def testTwos(self): |