diff options
author | MelissaWM <melissawm@gmail.com> | 2020-09-23 23:09:46 -0300 |
---|---|---|
committer | MelissaWM <melissawm@gmail.com> | 2020-09-24 13:51:06 -0300 |
commit | bf71a62b52dedd8ceaa47a96c144a3584e1bd95b (patch) | |
tree | c4c8857908f3c54dc2869944b7905ba6d5fb6d2f /numpy/f2py/tests/test_module_doc.py | |
parent | ffb6f185b5775c612524496e98c8e6240f9bfccd (diff) | |
download | numpy-bf71a62b52dedd8ceaa47a96c144a3584e1bd95b.tar.gz |
BUG: Fixes module data docstrings.
Fixes gh-15325
Diffstat (limited to 'numpy/f2py/tests/test_module_doc.py')
-rw-r--r-- | numpy/f2py/tests/test_module_doc.py | 16 |
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) |