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

Method test_create_write

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

Source from the content-addressed store, hash-verified

1519 self.assertLess(delta, 3)
1520
1521 def test_create_write(self):
1522 delta = 0
1523 lastrc = sys.gettotalrefcount()
1524 s = NUL()
1525 for i in range(20):
1526 gc.collect()
1527 self.assertEqual(gc.garbage, [])
1528 rc = sys.gettotalrefcount()
1529 csv.writer(s)
1530 csv.writer(s)
1531 csv.writer(s)
1532 delta = rc-lastrc
1533 lastrc = rc
1534 # if csv.writer() leaks, last delta should be 3 or more
1535 self.assertLess(delta, 3)
1536
1537 def test_read(self):
1538 delta = 0

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected