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