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

Function test_read_from_bad_generator

numpy/lib/tests/test_loadtxt.py:460–467  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

458
459
460def test_read_from_bad_generator():
461 def gen():
462 for entry in ["1,2", b"3, 5", 12738]:
463 yield entry
464
465 with pytest.raises(
466 TypeError, match=r"non-string returned while reading data"):
467 np.loadtxt(gen(), dtype="i, i", delimiter=",")
468
469
470@pytest.mark.skipif(not HAS_REFCOUNT, reason="Python lacks refcounts")

Callers

nothing calls this directly

Calls 1

genFunction · 0.85

Tested by

no test coverage detected