(self)
| 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 |
nothing calls this directly
no test coverage detected