MCPcopy Index your code
hub / github.com/RustPython/RustPython / writerAssertEqual

Method writerAssertEqual

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

Source from the content-addressed store, hash-verified

715 self.assertEqual(fields, expected_result)
716
717 def writerAssertEqual(self, input, expected_result):
718 with TemporaryFile("w+", encoding="utf-8", newline='') as fileobj:
719 writer = csv.writer(fileobj, dialect = self.dialect)
720 writer.writerows(input)
721 fileobj.seek(0)
722 self.assertEqual(fileobj.read(), expected_result)
723
724class TestDialectExcel(TestCsvBase):
725 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
writerMethod · 0.45
writerowsMethod · 0.45
seekMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected