MCPcopy Create free account
hub / github.com/numpy/numpy / test_crackedlines

Method test_crackedlines

numpy/f2py/tests/test_data.py:26–35  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24 assert np.all(self.module.cmplxdat.ref_index_two == np.array([-30.0 + 43.0j]))
25
26 def test_crackedlines(self):
27 mod = crackfortran(self.sources)
28 assert mod[0]['vars']['x']['='] == '1.5'
29 assert mod[0]['vars']['y']['='] == '2.0'
30 assert mod[0]['vars']['pi']['='] == '3.1415926535897932384626433832795028841971693993751058209749445923078164062d0'
31 assert mod[0]['vars']['my_real_array']['='] == '(/1.0d0, 2.0d0, 3.0d0/)'
32 assert mod[0]['vars']['ref_index_one']['='] == '(13.0d0, 21.0d0)'
33 assert mod[0]['vars']['ref_index_two']['='] == '(-30.0d0, 43.0d0)'
34 assert mod[0]['vars']['my_array']['='] == '(/(1.0d0, 2.0d0), (-3.0d0, 4.0d0)/)'
35 assert mod[0]['vars']['z']['='] == '(/3.5, 7.0/)'
36
37class TestDataF77(util.F2PyTest):
38 sources = [util.getpath("tests", "src", "crackfortran", "data_common.f")]

Callers

nothing calls this directly

Calls 1

crackfortranFunction · 0.90

Tested by

no test coverage detected