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

Method writerAssertEqual

Lib/test/test_csv.py:698–703  ·  view source on GitHub ↗
(self, input, expected_result)

Source from the content-addressed store, hash-verified

696 self.assertEqual(fields, expected_result)
697
698 def writerAssertEqual(self, input, expected_result):
699 with TemporaryFile("w+", encoding="utf-8", newline='') as fileobj:
700 writer = csv.writer(fileobj, dialect = self.dialect)
701 writer.writerows(input)
702 fileobj.seek(0)
703 self.assertEqual(fileobj.read(), expected_result)
704
705class TestDialectExcel(TestCsvBase):
706 dialect = 'excel'

Callers 9

test_nullMethod · 0.80
test_single_writerMethod · 0.80
test_simple_writerMethod · 0.80
test_quotesMethod · 0.80
test_quote_fieldsepMethod · 0.80
test_newlinesMethod · 0.80
test_escape_fieldsepMethod · 0.80
test_simple_writerMethod · 0.80

Calls 6

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

Tested by

no test coverage detected