MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_read

Method test_read

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

Source from the content-addressed store, hash-verified

1535 self.assertLess(delta, 3)
1536
1537 def test_read(self):
1538 delta = 0
1539 rows = ["a,b,c\r\n"]*5
1540 lastrc = sys.gettotalrefcount()
1541 for i in range(20):
1542 gc.collect()
1543 self.assertEqual(gc.garbage, [])
1544 rc = sys.gettotalrefcount()
1545 rdr = csv.reader(rows)
1546 for row in rdr:
1547 pass
1548 delta = rc-lastrc
1549 lastrc = rc
1550 # if reader leaks during read, delta should be 5 or more
1551 self.assertLess(delta, 5)
1552
1553 def test_write(self):
1554 delta = 0

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected