MCPcopy Create free account
hub / github.com/python/cpython / test_guess_delimiter_crlf_not_chosen

Method test_guess_delimiter_crlf_not_chosen

Lib/test/test_csv.py:1484–1489  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1482 self.assertTrue(dialect.doublequote)
1483
1484 def test_guess_delimiter_crlf_not_chosen(self):
1485 # Ensure that we pick the real delimiter ("|") over "\r" in a tie.
1486 sniffer = csv.Sniffer()
1487 sample = "a|b\r\nc|d\r\ne|f\r\n"
1488 self.assertEqual(sniffer.sniff(sample).delimiter, "|")
1489 self.assertNotEqual(sniffer.sniff(sample).delimiter, "\r")
1490
1491 def test_zero_mode_tie_order_independence(self):
1492 sniffer = csv.Sniffer()

Callers

nothing calls this directly

Calls 3

sniffMethod · 0.95
assertNotEqualMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected