MCPcopy Index your code
hub / github.com/python/cpython / compare_dialect_123

Method compare_dialect_123

Lib/test/test_csv.py:639–646  ·  view source on GitHub ↗
(self, expected, *writeargs, **kwwriteargs)

Source from the content-addressed store, hash-verified

637 self.assertEqual(next(reader), ["c1ccccc1", "benzene"])
638
639 def compare_dialect_123(self, expected, *writeargs, **kwwriteargs):
640
641 with TemporaryFile("w+", newline='', encoding="utf-8") as fileobj:
642
643 writer = csv.writer(fileobj, *writeargs, **kwwriteargs)
644 writer.writerow([1,2,3])
645 fileobj.seek(0)
646 self.assertEqual(fileobj.read(), expected)
647
648 def test_dialect_apply(self):
649 class testA(csv.excel):

Callers 1

test_dialect_applyMethod · 0.95

Calls 6

TemporaryFileFunction · 0.90
writerowMethod · 0.80
writerMethod · 0.45
seekMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected