@@ -492,11 +492,11 @@ def test_raise_on_usecols_names_mismatch(self):
492
492
tm .assert_frame_equal (df , expected )
493
493
494
494
usecols = ['a' , 'b' , 'c' , 'f' ]
495
- with tm .assert_raises_regex (ValueError , msg .format (missing = ['f' ] )):
495
+ with tm .assert_raises_regex (ValueError , msg .format (missing = "\ ['f'\]" )):
496
496
self .read_csv (StringIO (data ), usecols = usecols )
497
497
498
498
usecols = ['a' , 'b' , 'f' ]
499
- with tm .assert_raises_regex (ValueError , msg .format (missing = ['f' ] )):
499
+ with tm .assert_raises_regex (ValueError , msg .format (missing = "\ ['f'\]" )):
500
500
self .read_csv (StringIO (data ), usecols = usecols )
501
501
502
502
names = ['A' , 'B' , 'C' , 'D' ]
@@ -520,9 +520,9 @@ def test_raise_on_usecols_names_mismatch(self):
520
520
# tm.assert_frame_equal(df, expected)
521
521
522
522
usecols = ['A' , 'B' , 'C' , 'f' ]
523
- with tm .assert_ra (ValueError , msg .format (missing = ['f' ] )):
523
+ with tm .assert_raises_regex (ValueError , msg .format (missing = "\ ['f'\]" )):
524
524
self .read_csv (StringIO (data ), header = 0 , names = names ,
525
525
usecols = usecols )
526
526
usecols = ['A' , 'B' , 'f' ]
527
- with tm .assert_raises_regex (ValueError , msg .format (missing = ['f' ] )):
527
+ with tm .assert_raises_regex (ValueError , msg .format (missing = "\ ['f'\]" )):
528
528
self .read_csv (StringIO (data ), names = names , usecols = usecols )
0 commit comments