File size: 650 Bytes
dc2106c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import sys
import pytest
from . import util

from numpy.testing import assert_equal, IS_PYPY

class TestBlockDocString(util.F2PyTest):
    code = """

      SUBROUTINE FOO()

      INTEGER BAR(2, 3)



      COMMON  /BLOCK/ BAR

      RETURN

      END

    """

    @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_block_docstring(self):
        expected = "bar : 'i'-array(2,3)\n"
        assert_equal(self.module.block.__doc__, expected)