summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-06-10 18:43:06 +0200
committerMichael Vogt <mvo@debian.org>2014-06-10 18:43:06 +0200
commit133453cd78109e10f9f23168ba3e5923e9afffae (patch)
tree762b1ec940d5712e9c2ab0ef5290f040c655de18 /tests
parent09079e23657cbe0b751499bd2860d0b2633c4ef8 (diff)
downloadpython-apt-133453cd78109e10f9f23168ba3e5923e9afffae.tar.gz
Revert "Merge remote-tracking branch 'mvo/feature/srcrec-enum' into debian/sid"
This reverts commit 1b6b123a052ca2d53e90b62da09ce300d701265a, reversing changes made to 9de6a183f09f0d0adbcc5817872c5a0024f5ef47.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_tagfile.py24
1 files changed, 0 insertions, 24 deletions
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()