test_common.py 584 B

123456789101112131415161718
  1. import os
  2. import sys
  3. import pytest
  4. import numpy as np
  5. from . import util
  6. class TestCommonBlock(util.F2PyTest):
  7. sources = [util.getpath("tests", "src", "common", "block.f")]
  8. @pytest.mark.skipif(sys.platform == "win32",
  9. reason="Fails with MinGW64 Gfortran (Issue #9673)")
  10. def test_common_block(self):
  11. self.module.initcb()
  12. assert self.module.block.long_bn == np.array(1.0, dtype=np.float64)
  13. assert self.module.block.string_bn == np.array("2", dtype="|S1")
  14. assert self.module.block.ok == np.array(3, dtype=np.int32)