Skip to content

Commit dced1b7

Browse files
Fixing silly error in tests
1 parent 841a6cc commit dced1b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/tests/io/parser/usecols.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,11 +492,11 @@ def test_raise_on_usecols_names_mismatch(self):
492492
tm.assert_frame_equal(df, expected)
493493

494494
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'\]")):
496496
self.read_csv(StringIO(data), usecols=usecols)
497497

498498
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'\]")):
500500
self.read_csv(StringIO(data), usecols=usecols)
501501

502502
names = ['A', 'B', 'C', 'D']
@@ -520,9 +520,9 @@ def test_raise_on_usecols_names_mismatch(self):
520520
# tm.assert_frame_equal(df, expected)
521521

522522
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'\]")):
524524
self.read_csv(StringIO(data), header=0, names=names,
525525
usecols=usecols)
526526
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'\]")):
528528
self.read_csv(StringIO(data), names=names, usecols=usecols)

0 commit comments

Comments
 (0)