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

Function test_nul_character_error

numpy/lib/tests/test_loadtxt.py:751–757  ·  view source on GitHub ↗
(dtype)

Source from the content-addressed store, hash-verified

749@pytest.mark.parametrize("dtype",
750 np.typecodes["AllInteger"] + "efgdFDG" + "?")
751def test_nul_character_error(dtype):
752 # Test that a \0 character is correctly recognized as an error even if
753 # what comes before is valid (not everything gets parsed internally).
754 if dtype.lower() == "g":
755 pytest.xfail("longdouble/clongdouble assignment may misbehave.")
756 with pytest.raises(ValueError):
757 np.loadtxt(["1\000"], dtype=dtype, delimiter=",", quotechar='"')
758
759
760@pytest.mark.skipif(IS_PYPY and sys.implementation.version <= (7, 3, 8),

Callers

nothing calls this directly

Calls 1

lowerMethod · 0.80

Tested by

no test coverage detected