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

Method test_nofile

numpy/core/tests/test_multiarray.py:5280–5286  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5278 yield filename
5279
5280 def test_nofile(self):
5281 # this should probably be supported as a file
5282 # but for now test for proper errors
5283 b = io.BytesIO()
5284 assert_raises(OSError, np.fromfile, b, np.uint8, 80)
5285 d = np.ones(7)
5286 assert_raises(OSError, lambda x: x.tofile(b), d)
5287
5288 def test_bool_fromstring(self):
5289 v = np.array([True, False, True, False], dtype=np.bool_)

Callers

nothing calls this directly

Calls 2

assert_raisesFunction · 0.90
tofileMethod · 0.80

Tested by

no test coverage detected