diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2021-12-05 16:30:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-05 16:30:05 -0700 |
commit | d14d2c359fcbd499b73d254f0c20dd1a884ff9a3 (patch) | |
tree | 81edd1df081824acf385c12acafae65c1c381a9e /numpy/f2py/tests/test_module_doc.py | |
parent | 1bef412560293e67f9cf8c4e7b20a904c46ce41d (diff) | |
parent | 90e20e58eda7547678c6d2a4c121b0317de9c74d (diff) | |
download | numpy-d14d2c359fcbd499b73d254f0c20dd1a884ff9a3.tar.gz |
Merge pull request #20479 from HaoZeke/f2pyTestPath
TST,STY: Clean up F2PY tests for pathlib.Path
Diffstat (limited to 'numpy/f2py/tests/test_module_doc.py')
-rw-r--r-- | numpy/f2py/tests/test_module_doc.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/numpy/f2py/tests/test_module_doc.py b/numpy/f2py/tests/test_module_doc.py index 4b9555cee..b66cff000 100644 --- a/numpy/f2py/tests/test_module_doc.py +++ b/numpy/f2py/tests/test_module_doc.py @@ -7,24 +7,24 @@ from . import util from numpy.testing import assert_equal, IS_PYPY -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')] + sources = [ + util.getpath("tests", "src", "module_data", + "module_data_docstring.f90") + ] - @pytest.mark.skipif(sys.platform=='win32', - reason='Fails with MinGW64 Gfortran (Issue #9673)') + @pytest.mark.skipif(sys.platform == "win32", + reason="Fails with MinGW64 Gfortran (Issue #9673)") @pytest.mark.xfail(IS_PYPY, reason="PyPy cannot modify tp_doc after PyType_Ready") def test_module_docstring(self): - assert_equal(self.module.mod.__doc__, - textwrap.dedent('''\ + assert_equal( + self.module.mod.__doc__, + textwrap.dedent("""\ i : 'i'-scalar x : 'i'-array(4) a : 'f'-array(2,3) b : 'f'-array(-1,-1), not allocated\x00 foo()\n - Wrapper for ``foo``.\n\n''') - ) + Wrapper for ``foo``.\n\n"""), + ) |