From 133453cd78109e10f9f23168ba3e5923e9afffae Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 10 Jun 2014 18:43:06 +0200 Subject: Revert "Merge remote-tracking branch 'mvo/feature/srcrec-enum' into debian/sid" This reverts commit 1b6b123a052ca2d53e90b62da09ce300d701265a, reversing changes made to 9de6a183f09f0d0adbcc5817872c5a0024f5ef47. --- tests/test_tagfile.py | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'tests/test_tagfile.py') diff --git a/tests/test_tagfile.py b/tests/test_tagfile.py index ff7d81cd..6ff6a32a 100644 --- a/tests/test_tagfile.py +++ b/tests/test_tagfile.py @@ -132,29 +132,5 @@ class TestTagFile(unittest.TestCase): self.assertEqual( value.encode("ISO-8859-1"), tagfile.section["Maintainer"]) - @unittest.skipIf(not os.path.exists("/proc/self/fd"), "need /proc/self/fd") - def test_leak(self): - # clenaup gc first - import gc - gc.collect() - # see what fds we have - fds = os.listdir("/proc/self/fd") - testfile = __file__ - tagf = apt_pkg.TagFile(testfile) - tagf.step() - print("1", tagf.section) - sec = tagf.section - print("2", sec) - print(gc.get_referrers(sec)) - self.assertTrue(str(tagf.section).startswith("#!/usr/bin/python")) - del tagf - print(gc.get_referrers(sec)) - # sec is still ok - print("42", sec) - self.assertTrue(str(sec).startswith("#!/usr/bin/python")) - # ensure fd is closed - self.assertEqual(fds, os.listdir("/proc/self/fd")) - - if __name__ == "__main__": unittest.main() -- cgit v1.2.3