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

Function test_comment_multiple_chars

numpy/lib/tests/test_loadtxt.py:35–39  ·  view source on GitHub ↗
(comment)

Source from the content-addressed store, hash-verified

33
34@pytest.mark.parametrize("comment", ["..", "//", "@-", "this is a comment:"])
35def test_comment_multiple_chars(comment):
36 content = "# IGNORE\n1.5, 2.5# ABC\n3.0,4.0# XXX\n5.5,6.0\n"
37 txt = StringIO(content.replace("#", comment))
38 a = np.loadtxt(txt, delimiter=",", comments=comment)
39 assert_equal(a, [[1.5, 2.5], [3.0, 4.0], [5.5, 6.0]])
40
41
42@pytest.fixture

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
replaceMethod · 0.80

Tested by

no test coverage detected