diff options
author | jutke <jutke@allstate.com> | 2017-01-20 15:20:38 -0600 |
---|---|---|
committer | jutke <jutke@allstate.com> | 2017-01-20 15:20:38 -0600 |
commit | 8610e48687e7a05e7e0e0735629e5cace69cb04f (patch) | |
tree | ec0d274aa7277d7f3b0a99ba7c790b998149c805 /numpy/f2py/tests/test_parameter.py | |
parent | 1e873ead0c0857f0bbdaab36764afa67cc39479e (diff) | |
download | numpy-8610e48687e7a05e7e0e0735629e5cace69cb04f.tar.gz |
TST: adding test for constants without compound kind spec
This augments the test in constant_compound.f90 by
using constants without a compound kind spec to
illustrate the case that led to the
reporting of issue #8493
Diffstat (limited to 'numpy/f2py/tests/test_parameter.py')
-rw-r--r-- | numpy/f2py/tests/test_parameter.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/f2py/tests/test_parameter.py b/numpy/f2py/tests/test_parameter.py index e7c6add51..b6891756d 100644 --- a/numpy/f2py/tests/test_parameter.py +++ b/numpy/f2py/tests/test_parameter.py @@ -19,6 +19,7 @@ class TestParameters(util.F2PyTest): _path('src', 'parameter', 'constant_integer.f90'), _path('src', 'parameter', 'constant_both.f90'), _path('src', 'parameter', 'constant_compound.f90'), + _path('src', 'parameter', 'constant_non_compound.f90'), ] @dec.slow @@ -55,6 +56,13 @@ class TestParameters(util.F2PyTest): assert_equal(x, [0 + 1 + 2*6, 1, 2]) @dec.slow + def test_constant_non_compound_int(self): + # check values + x = np.arange(4, dtype=np.int32) + self.module.foo_non_compound_int(x) + assert_equal(x, [0 + 1 + 2 + 3*4, 1, 2, 3]) + + @dec.slow def test_constant_integer_int(self): # non-contiguous should raise error x = np.arange(6, dtype=np.int32)[::2] |