@@ -492,16 +492,18 @@ 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 (
496
+ ValueError , msg .format (missing = r"\['f'\]" )):
496
497
self .read_csv (StringIO (data ), usecols = usecols )
497
498
498
499
usecols = ['a' , 'b' , 'f' ]
499
- with tm .assert_raises_regex (ValueError , msg .format (missing = "\['f'\]" )):
500
+ with tm .assert_raises_regex (
501
+ ValueError , msg .format (missing = r"\['f'\]" )):
500
502
self .read_csv (StringIO (data ), usecols = usecols )
501
503
502
504
usecols = ['a' , 'b' , 'f' , 'g' ]
503
505
with tm .assert_raises_regex (
504
- ValueError , msg .format (missing = "\[('f', 'g'|'g', 'f')\]" )):
506
+ ValueError , msg .format (missing = r "\[('f', 'g'|'g', 'f')\]" )):
505
507
self .read_csv (StringIO (data ), usecols = usecols )
506
508
507
509
names = ['A' , 'B' , 'C' , 'D' ]
@@ -525,9 +527,11 @@ def test_raise_on_usecols_names_mismatch(self):
525
527
# tm.assert_frame_equal(df, expected)
526
528
527
529
usecols = ['A' , 'B' , 'C' , 'f' ]
528
- with tm .assert_raises_regex (ValueError , msg .format (missing = "\['f'\]" )):
530
+ with tm .assert_raises_regex (
531
+ ValueError , msg .format (missing = r"\['f'\]" )):
529
532
self .read_csv (StringIO (data ), header = 0 , names = names ,
530
533
usecols = usecols )
531
534
usecols = ['A' , 'B' , 'f' ]
532
- with tm .assert_raises_regex (ValueError , msg .format (missing = "\['f'\]" )):
535
+ with tm .assert_raises_regex (
536
+ ValueError , msg .format (missing = r"\['f'\]" )):
533
537
self .read_csv (StringIO (data ), names = names , usecols = usecols )
0 commit comments