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

Method test_read

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

Source from the content-addressed store, hash-verified

1571 self.assertLess(delta, 3)
1572
1573 def test_read(self):
1574 delta = 0
1575 rows = ["a,b,c\r\n"]*5
1576 lastrc = sys.gettotalrefcount()
1577 for i in range(20):
1578 gc.collect()
1579 self.assertEqual(gc.garbage, [])
1580 rc = sys.gettotalrefcount()
1581 rdr = csv.reader(rows)
1582 for row in rdr:
1583 pass
1584 delta = rc-lastrc
1585 lastrc = rc
1586 # if reader leaks during read, delta should be 5 or more
1587 self.assertLess(delta, 5)
1588
1589 def test_write(self):
1590 delta = 0

Callers

nothing calls this directly

Calls 4

collectMethod · 0.45
assertEqualMethod · 0.45
readerMethod · 0.45
assertLessMethod · 0.45

Tested by

no test coverage detected