added script to obviate nasty memory leak in Index_getitem

This commit is contained in:
Jared Flatow
2011-05-08 11:13:19 -07:00
parent 9dfc40e3f3
commit b7fe1f90d0

17
test/test_leak.py Normal file
View File

@@ -0,0 +1,17 @@
import unittest
import utils
class TestLeak(utils.RepoTestCase):
def test_index_iter(self):
index = self.repo.index
while True:
list(index)
def test_index_getitem(self):
index = self.repo.index
while True:
index[0]
if __name__ == '__main__':
unittest.main()