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

Method test_read_linenum

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

Source from the content-addressed store, hash-verified

502 csv.field_size_limit(limit)
503
504 def test_read_linenum(self):
505 r = csv.reader(['line,1', 'line,2', 'line,3'])
506 self.assertEqual(r.line_num, 0)
507 next(r)
508 self.assertEqual(r.line_num, 1)
509 next(r)
510 self.assertEqual(r.line_num, 2)
511 next(r)
512 self.assertEqual(r.line_num, 3)
513 self.assertRaises(StopIteration, next, r)
514 self.assertEqual(r.line_num, 3)
515
516 def test_roundtrip_quoteed_newlines(self):
517 rows = [

Callers

nothing calls this directly

Calls 3

readerMethod · 0.45
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected