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

Method test_write_no_fields

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

Source from the content-addressed store, hash-verified

865 "f1,f2,f3\r\n1,abc,f\r\n2,5,xyz\r\n")
866
867 def test_write_no_fields(self):
868 fileobj = StringIO()
869 self.assertRaises(TypeError, csv.DictWriter, fileobj)
870
871 def test_write_fields_not_in_fieldnames(self):
872 with TemporaryFile("w+", encoding="utf-8", newline='') as fileobj:

Callers

nothing calls this directly

Calls 2

StringIOClass · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected