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

Method test_fromfile_bogus

numpy/core/tests/test_longdouble.py:148–155  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

146 out = ''.join([repr(t) + '\n' for t in tgt])
147
148 def test_fromfile_bogus(self):
149 with temppath() as path:
150 with open(path, 'w') as f:
151 f.write("1. 2. 3. flop 4.\n")
152
153 with assert_warns(DeprecationWarning):
154 res = np.fromfile(path, dtype=float, sep=" ")
155 assert_equal(res, np.array([1., 2., 3.]))
156
157 def test_fromfile_complex(self):
158 for ctype in ["complex", "cdouble", "cfloat"]:

Callers

nothing calls this directly

Calls 5

temppathFunction · 0.90
assert_warnsFunction · 0.90
assert_equalFunction · 0.90
openFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected