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

Method test_writer_arg_valid

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

Source from the content-addressed store, hash-verified

92 self.assertRaises(OSError, csv.reader, BadIterable())
93
94 def test_writer_arg_valid(self):
95 self._test_arg_valid(csv.writer, StringIO())
96 class BadWriter:
97 @property
98 def write(self):
99 raise OSError
100 self.assertRaises(OSError, csv.writer, BadWriter())
101
102 def _test_default_attrs(self, ctor, *args):
103 obj = ctor(*args)

Callers

nothing calls this directly

Calls 4

_test_arg_validMethod · 0.95
StringIOClass · 0.90
BadWriterClass · 0.85
assertRaisesMethod · 0.45

Tested by

no test coverage detected