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

Method test_comments_multiple

numpy/lib/tests/test_io.py:807–814  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

805 assert_array_equal(x, a)
806
807 def test_comments_multiple(self):
808 c = TextIO()
809 c.write('# comment\n1,2,3\n@ comment2\n4,5,6 // comment3')
810 c.seek(0)
811 x = np.loadtxt(c, dtype=int, delimiter=',',
812 comments=['#', '@', '//'])
813 a = np.array([[1, 2, 3], [4, 5, 6]], int)
814 assert_array_equal(x, a)
815
816 @pytest.mark.skipif(IS_PYPY and sys.implementation.version <= (7, 3, 8),
817 reason="PyPy bug in error formatting")

Callers

nothing calls this directly

Calls 4

writeMethod · 0.95
assert_array_equalFunction · 0.90
TextIOClass · 0.85
seekMethod · 0.80

Tested by

no test coverage detected