(self)
| 816 | @pytest.mark.skipif(IS_PYPY and sys.implementation.version <= (7, 3, 8), |
| 817 | reason="PyPy bug in error formatting") |
| 818 | def test_comments_multi_chars(self): |
| 819 | c = TextIO() |
| 820 | c.write('/* comment\n1,2,3,5\n') |
| 821 | c.seek(0) |
| 822 | x = np.loadtxt(c, dtype=int, delimiter=',', |
| 823 | comments='/*') |
| 824 | a = np.array([1, 2, 3, 5], int) |
| 825 | assert_array_equal(x, a) |
| 826 | |
| 827 | # Check that '/*' is not transformed to ['/', '*'] |
| 828 | c = TextIO() |
| 829 | c.write('*/ comment\n1,2,3,5\n') |
| 830 | c.seek(0) |
| 831 | assert_raises(ValueError, np.loadtxt, c, dtype=int, delimiter=',', |
| 832 | comments='/*') |
| 833 | |
| 834 | def test_skiprows(self): |
| 835 | c = TextIO() |
nothing calls this directly
no test coverage detected