diff --git a/test/test_leak.py b/test/test_leak.py new file mode 100644 index 0000000..35259b8 --- /dev/null +++ b/test/test_leak.py @@ -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()