Skip to content

Commit 07d781f

Browse files
committed
Trim the test comment and tighten the NEWS wording
1 parent ebb5be4 commit 07d781f

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

Lib/test/test_csv.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,9 +1464,7 @@ def test_sniff(self):
14641464
self.assertIs(dialect.skipinitialspace, False)
14651465

14661466
def test_sniff_delimiter_equals_quotechar(self):
1467-
# A sample that makes sniff() guess a dialect whose delimiter equals
1468-
# its quotechar is invalid; that must surface as csv.Error, not as a
1469-
# raw ValueError leaking from the _csv extension.
1467+
# An inconsistent guessed dialect must surface as csv.Error.
14701468
sniffer = csv.Sniffer()
14711469
for sample in ('"', '""', "''"):
14721470
with self.subTest(sample=sample):
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
:meth:`csv.Sniffer.sniff` now raises :exc:`csv.Error` for an inconsistent
2-
guessed dialect, for example one whose delimiter equals its quote character,
3-
instead of returning it. :meth:`csv.Sniffer.has_header` now raises
4-
:exc:`csv.Error` instead of leaking a :exc:`ValueError`.
2+
guessed dialect (one whose delimiter equals its quote character) instead of
3+
returning it. :meth:`csv.Sniffer.has_header` now raises :exc:`csv.Error`
4+
instead of leaking a :exc:`ValueError`.

0 commit comments

Comments
 (0)