From e56ad01c7c821e05077705fba171ff4adead88f9 Mon Sep 17 00:00:00 2001 From: Bob Eldering Date: Fri, 7 Jul 2017 14:21:24 +0200 Subject: [PATCH] TST: test doc string of COMMON block arrays for numpy.f2py. --- numpy/f2py/tests/test_block_docstring.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 numpy/f2py/tests/test_block_docstring.py diff --git a/numpy/f2py/tests/test_block_docstring.py b/numpy/f2py/tests/test_block_docstring.py new file mode 100644 index 000000000000..efe2f4b6e500 --- /dev/null +++ b/numpy/f2py/tests/test_block_docstring.py @@ -0,0 +1,23 @@ +from __future__ import division, absolute_import, print_function + +import textwrap +import util + +from numpy.testing import run_module_suite, assert_equal + +class TestBlockDocString(util.F2PyTest): + code = """ + SUBROUTINE FOO() + INTEGER BAR(2, 3) + + COMMON /BLOCK/ BAR + RETURN + END + """ + + def test_block_docstring(self): + expected = "'i'-array(2,3)\n" + assert_equal(self.module.block.__doc__, expected) + +if __name__ == "__main__": + run_module_suite()