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

Method test_create_write

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

Source from the content-addressed store, hash-verified

1555 self.assertLess(delta, 3)
1556
1557 def test_create_write(self):
1558 delta = 0
1559 lastrc = sys.gettotalrefcount()
1560 s = NUL()
1561 for i in range(20):
1562 gc.collect()
1563 self.assertEqual(gc.garbage, [])
1564 rc = sys.gettotalrefcount()
1565 csv.writer(s)
1566 csv.writer(s)
1567 csv.writer(s)
1568 delta = rc-lastrc
1569 lastrc = rc
1570 # if csv.writer() leaks, last delta should be 3 or more
1571 self.assertLess(delta, 3)
1572
1573 def test_read(self):
1574 delta = 0

Callers

nothing calls this directly

Calls 5

NULClass · 0.85
collectMethod · 0.45
assertEqualMethod · 0.45
writerMethod · 0.45
assertLessMethod · 0.45

Tested by

no test coverage detected