Skip to content

Commit ab871e0

Browse files
committed
check the exc msg
1 parent cecb897 commit ab871e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_csv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ def test_zero_mode_tie_order_comma_first(self):
14711471
"g:h\n"
14721472
)
14731473
sample = pattern * 10
1474-
with self.assertRaises(csv.Error):
1474+
with self.assertRaisesRegex(csv.Error, "Could not determine delimiter"):
14751475
sniffer.sniff(sample)
14761476

14771477
def test_zero_mode_tie_order_colon_first(self):
@@ -1483,7 +1483,7 @@ def test_zero_mode_tie_order_colon_first(self):
14831483
"g,h\n"
14841484
)
14851485
sample = pattern * 10
1486-
with self.assertRaises(csv.Error):
1486+
with self.assertRaisesRegex(csv.Error, "Could not determine delimiter"):
14871487
sniffer.sniff(sample)
14881488

14891489
class NUL:

0 commit comments

Comments
 (0)