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

Method test_crackedlines

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

crackfortranFunction · 0.90

Tested by

no test coverage detected