@@ -836,7 +836,8 @@ def test_integer_overflow_bug(self):
836836 result = self .read_csv (StringIO (data ), header = None , sep = ' ' )
837837 self .assertTrue (result [0 ].dtype == np .float64 )
838838
839- result = self .read_csv (StringIO (data ), header = None , sep = '\s+' )
839+ result = self .read_csv (StringIO (data ), header = None ,
840+ quoting = csv .QUOTE_NONE , sep = '\s+' )
840841 self .assertTrue (result [0 ].dtype == np .float64 )
841842
842843 def test_catch_too_many_names (self ):
@@ -852,7 +853,8 @@ def test_catch_too_many_names(self):
852853 def test_ignore_leading_whitespace (self ):
853854 # see gh-3374, gh-6607
854855 data = ' a b c\n 1 2 3\n 4 5 6\n 7 8 9'
855- result = self .read_table (StringIO (data ), sep = '\s+' )
856+ result = self .read_table (StringIO (data ), sep = '\s+' ,
857+ quoting = csv .QUOTE_NONE )
856858 expected = DataFrame ({'a' : [1 , 4 , 7 ], 'b' : [2 , 5 , 8 ], 'c' : [3 , 6 , 9 ]})
857859 tm .assert_frame_equal (result , expected )
858860
@@ -1157,7 +1159,8 @@ def test_empty_lines(self):
11571159 [- 70. , .4 , 1. ]])
11581160 df = self .read_csv (StringIO (data ))
11591161 tm .assert_numpy_array_equal (df .values , expected )
1160- df = self .read_csv (StringIO (data .replace (',' , ' ' )), sep = '\s+' )
1162+ df = self .read_csv (StringIO (data .replace (',' , ' ' )),
1163+ quoting = csv .QUOTE_NONE , sep = '\s+' )
11611164 tm .assert_numpy_array_equal (df .values , expected )
11621165 expected = np .array ([[1. , 2. , 4. ],
11631166 [np .nan , np .nan , np .nan ],
@@ -1189,14 +1192,16 @@ def test_regex_separator(self):
11891192b 1 2 3 4
11901193c 1 2 3 4
11911194"""
1192- df = self .read_table (StringIO (data ), sep = '\s+' )
1195+ df = self .read_table (StringIO (data ), sep = '\s+' ,
1196+ quoting = csv .QUOTE_NONE )
11931197 expected = self .read_csv (StringIO (re .sub ('[ ]+' , ',' , data )),
11941198 index_col = 0 )
11951199 self .assertIsNone (expected .index .name )
11961200 tm .assert_frame_equal (df , expected )
11971201
11981202 data = ' a b c\n 1 2 3 \n 4 5 6\n 7 8 9'
1199- result = self .read_table (StringIO (data ), sep = '\s+' )
1203+ result = self .read_table (StringIO (data ), sep = '\s+' ,
1204+ quoting = csv .QUOTE_NONE )
12001205 expected = DataFrame ([[1 , 2 , 3 ], [4 , 5 , 6 ], [7 , 8 , 9 ]],
12011206 columns = ['a' , 'b' , 'c' ])
12021207 tm .assert_frame_equal (result , expected )
@@ -1580,7 +1585,8 @@ def test_temporary_file(self):
15801585 new_file .flush ()
15811586 new_file .seek (0 )
15821587
1583- result = self .read_csv (new_file , sep = '\s+' , header = None )
1588+ result = self .read_csv (new_file , sep = '\s+' , header = None ,
1589+ quoting = csv .QUOTE_NONE )
15841590 new_file .close ()
15851591 expected = DataFrame ([[0 , 0 ]])
15861592 tm .assert_frame_equal (result , expected )
0 commit comments