diff options
author | Nico Schlömer <nico.schloemer@gmail.com> | 2017-08-28 17:57:15 +0200 |
---|---|---|
committer | Nico Schlömer <nico.schloemer@gmail.com> | 2017-08-28 17:57:15 +0200 |
commit | 3c9108458cfe1c51582dfce94c5519f36fb60400 (patch) | |
tree | a34ce91fc6d356a0b7e684e8fff44331e002671e /numpy/f2py | |
parent | 6c93615282d91e8a911d597970a97afde35a6282 (diff) | |
download | numpy-3c9108458cfe1c51582dfce94c5519f36fb60400.tar.gz |
[TST] add tests for 0-sized Fortran arrays
Diffstat (limited to 'numpy/f2py')
-rw-r--r-- | numpy/f2py/tests/test_size.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/f2py/tests/test_size.py b/numpy/f2py/tests/test_size.py index ebf4acda5..000008114 100644 --- a/numpy/f2py/tests/test_size.py +++ b/numpy/f2py/tests/test_size.py @@ -15,6 +15,9 @@ class TestSizeSumExample(util.F2PyTest): @dec.slow def test_all(self): + r = self.module.foo([[]]) + assert_equal(r, [0], repr(r)) + r = self.module.foo([[1, 2]]) assert_equal(r, [3], repr(r)) @@ -26,6 +29,9 @@ class TestSizeSumExample(util.F2PyTest): @dec.slow def test_transpose(self): + r = self.module.foo([[]]) + assert_equal(r, [[]], repr(r)) + r = self.module.trans([[1, 2]]) assert_equal(r, [[1], [2]], repr(r)) @@ -34,6 +40,9 @@ class TestSizeSumExample(util.F2PyTest): @dec.slow def test_flatten(self): + r = self.module.flatten([[]]) + assert_equal(r, [], repr(r)) + r = self.module.flatten([[1, 2]]) assert_equal(r, [1, 2], repr(r)) |