Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
test_common.py24 linesDownload Raw Back to tests
1import pytest
2
3import numpy as np
4
5from . import util
6
7
8@pytest.mark.slow
9class TestCommonBlock(util.F2PyTest):
10    sources = [util.getpath("tests", "src", "common", "block.f")]
11
12    def test_common_block(self):
13        self.module.initcb()
14        assert self.module.block.long_bn == np.array(1.0, dtype=np.float64)
15        assert self.module.block.string_bn == np.array("2", dtype="|S1")
16        assert self.module.block.ok == np.array(3, dtype=np.int32)
17
18
19class TestCommonWithUse(util.F2PyTest):
20    sources = [util.getpath("tests", "src", "common", "gh19161.f90")]
21
22    def test_common_gh19161(self):
23        assert self.module.data.x == 0
24 
codekingpro/portable-devtools · Team Ai