MCPcopy Index your code
hub / github.com/numpy/numpy / test_comments_multi_chars

Method test_comments_multi_chars

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

Source from the content-addressed store, hash-verified

831 assert_array_equal(x, a)
832
833 def test_comments_multi_chars(self):
834 c = TextIO()
835 c.write('/* comment\n1,2,3,5\n')
836 c.seek(0)
837 x = np.loadtxt(c, dtype=int, delimiter=',',
838 comments='/*')
839 a = np.array([1, 2, 3, 5], int)
840 assert_array_equal(x, a)
841
842 # Check that '/*' is not transformed to ['/', '*']
843 c = TextIO()
844 c.write('*/ comment\n1,2,3,5\n')
845 c.seek(0)
846 assert_raises(ValueError, np.loadtxt, c, dtype=int, delimiter=',',
847 comments='/*')
848
849 def test_skiprows(self):
850 c = TextIO()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected