summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests/test_module_doc.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/f2py/tests/test_module_doc.py')
-rw-r--r--numpy/f2py/tests/test_module_doc.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/numpy/f2py/tests/test_module_doc.py b/numpy/f2py/tests/test_module_doc.py
new file mode 100644
index 000000000..f597929ad
--- /dev/null
+++ b/numpy/f2py/tests/test_module_doc.py
@@ -0,0 +1,16 @@
+import os
+from . import util
+
+from numpy.testing import assert_equal
+
+
+def _path(*a):
+ return os.path.join(*((os.path.dirname(__file__),) + a))
+
+
+class TestModuleDocString(util.F2PyTest):
+ sources = [_path('src', 'module_data', 'module_data_docstring.f90')]
+
+ def test_module_docstring(self):
+ expected = "i : 'i'-scalar\nx : 'i'-array(4)\na : 'f'-array(2,3)\nb : 'f'-array(-1,-1), not allocated\x00\nfoo()\n\nWrapper for ``foo``.\n\n"
+ assert_equal(self.module.mod.__doc__, expected)