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

Method test_write_quoting

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

Source from the content-addressed store, hash-verified

212 (bigstring, bigstring))
213
214 def test_write_quoting(self):
215 self._write_test(['a',1,'p,q'], 'a,1,"p,q"')
216 self._write_error_test(csv.Error, ['a',1,'p,q'],
217 quoting = csv.QUOTE_NONE)
218 self._write_test(['a',1,'p,q'], 'a,1,"p,q"',
219 quoting = csv.QUOTE_MINIMAL)
220 self._write_test(['a',1,'p,q'], '"a",1,"p,q"',
221 quoting = csv.QUOTE_NONNUMERIC)
222 self._write_test(['a',1,'p,q'], '"a","1","p,q"',
223 quoting = csv.QUOTE_ALL)
224 self._write_test(['a\nb',1], '"a\nb","1"',
225 quoting = csv.QUOTE_ALL)
226 self._write_test(['a','',None,1], '"a","",,1',
227 quoting = csv.QUOTE_STRINGS)
228 self._write_test(['a','',None,1], '"a","",,"1"',
229 quoting = csv.QUOTE_NOTNULL)
230
231 def test_write_escape(self):
232 self._write_test(['a',1,'p,q'], 'a,1,"p,q"',

Callers

nothing calls this directly

Calls 2

_write_testMethod · 0.95
_write_error_testMethod · 0.95

Tested by

no test coverage detected