@@ -858,7 +858,8 @@ def test_integer_overflow_bug(self):
858858 result = self .read_csv (StringIO (data ), header = None , sep = ' ' )
859859 self .assertTrue (result [0 ].dtype == np .float64 )
860860
861- result = self .read_csv (StringIO (data ), header = None , sep = r'\s+' )
861+ result = self .read_csv (StringIO (data ), header = None ,
862+ quoting = csv .QUOTE_NONE , sep = '\s+' )
862863 self .assertTrue (result [0 ].dtype == np .float64 )
863864
864865 def test_catch_too_many_names (self ):
@@ -874,7 +875,8 @@ def test_catch_too_many_names(self):
874875 def test_ignore_leading_whitespace (self ):
875876 # see gh-3374, gh-6607
876877 data = ' a b c\n 1 2 3\n 4 5 6\n 7 8 9'
877- result = self .read_table (StringIO (data ), sep = r'\s+' )
878+ result = self .read_table (StringIO (data ), sep = '\s+' ,
879+ quoting = csv .QUOTE_NONE )
878880 expected = DataFrame ({'a' : [1 , 4 , 7 ], 'b' : [2 , 5 , 8 ], 'c' : [3 , 6 , 9 ]})
879881 tm .assert_frame_equal (result , expected )
880882
@@ -1179,7 +1181,8 @@ def test_empty_lines(self):
11791181 [- 70. , .4 , 1. ]])
11801182 df = self .read_csv (StringIO (data ))
11811183 tm .assert_numpy_array_equal (df .values , expected )
1182- df = self .read_csv (StringIO (data .replace (',' , ' ' )), sep = r'\s+' )
1184+ df = self .read_csv (StringIO (data .replace (',' , ' ' )),
1185+ quoting = csv .QUOTE_NONE , sep = '\s+' )
11831186 tm .assert_numpy_array_equal (df .values , expected )
11841187 expected = np .array ([[1. , 2. , 4. ],
11851188 [np .nan , np .nan , np .nan ],
@@ -1211,14 +1214,16 @@ def test_regex_separator(self):
12111214b 1 2 3 4
12121215c 1 2 3 4
12131216"""
1214- df = self .read_table (StringIO (data ), sep = r'\s+' )
1217+ df = self .read_table (StringIO (data ), sep = '\s+' ,
1218+ quoting = csv .QUOTE_NONE )
12151219 expected = self .read_csv (StringIO (re .sub ('[ ]+' , ',' , data )),
12161220 index_col = 0 )
12171221 self .assertIsNone (expected .index .name )
12181222 tm .assert_frame_equal (df , expected )
12191223
12201224 data = ' a b c\n 1 2 3 \n 4 5 6\n 7 8 9'
1221- result = self .read_table (StringIO (data ), sep = r'\s+' )
1225+ result = self .read_table (StringIO (data ), sep = '\s+' ,
1226+ quoting = csv .QUOTE_NONE )
12221227 expected = DataFrame ([[1 , 2 , 3 ], [4 , 5 , 6 ], [7 , 8 , 9 ]],
12231228 columns = ['a' , 'b' , 'c' ])
12241229 tm .assert_frame_equal (result , expected )
@@ -1602,7 +1607,8 @@ def test_temporary_file(self):
16021607 new_file .flush ()
16031608 new_file .seek (0 )
16041609
1605- result = self .read_csv (new_file , sep = r'\s+' , header = None )
1610+ result = self .read_csv (new_file , sep = '\s+' , header = None ,
1611+ quoting = csv .QUOTE_NONE )
16061612 new_file .close ()
16071613 expected = DataFrame ([[0 , 0 ]])
16081614 tm .assert_frame_equal (result , expected )
0 commit comments