Skip to content

Commit

Permalink
Merge pull request numpy#9381 from bobeldering/f2py-test-block-docstring
Browse files Browse the repository at this point in the history
TST: test doc string of COMMON block arrays for numpy.f2py.
  • Loading branch information
charris committed Jul 7, 2017
2 parents 569c591 + e56ad01 commit 59f6ec0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions 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()

0 comments on commit 59f6ec0

Please sign in to comment.