diff options
author | martingoodson <martingoodson@gmail.com> | 2012-07-10 16:31:03 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2012-07-10 21:42:28 +0200 |
commit | 1a70875974aecec81de1866ad9847d511d420f65 (patch) | |
tree | 0147033be702763b62c4983a9bc3bcee5b923204 /numpy/lib/tests | |
parent | 436a28f4ea4d596c59e85745eac7446f7e18903f (diff) | |
download | numpy-1a70875974aecec81de1866ad9847d511d420f65.tar.gz |
BUG: make genfromtxt work with comments=None. Closes Github issue 329.
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r-- | numpy/lib/tests/test_io.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index c539c040a..aeda7663c 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -1426,8 +1426,6 @@ M 33 21.99 usecols=("A", "C", "E"), names=True) assert_equal(test.dtype.names, ctrl_names) - - def test_fixed_width_names(self): "Test fix-width w/ names" data = " A B C\n 0 1 2.3\n 45 67 9." @@ -1451,6 +1449,11 @@ M 33 21.99 test = np.ndfromtxt(StringIO(data), **kwargs) assert_equal(test, ctrl) + def test_comments_is_none(self): + # Github issue 329 (None was previously being converted to 'None'). + test = np.genfromtxt(StringIO("test1,testNonetherestofthedata"), + dtype=None, comments=None, delimiter=',') + assert_equal(test[1], asbytes('testNonetherestofthedata')) def test_recfromtxt(self): # @@ -1471,7 +1474,6 @@ M 33 21.99 assert_equal(test.mask, control.mask) assert_equal(test.A, [0, 2]) - def test_recfromcsv(self): # data = StringIO('A,B\n0,1\n2,3') |