summaryrefslogtreecommitdiff
path: root/Lib/test/test_pkgutil.py
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-04-18 23:31:33 +0000
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-04-18 23:31:33 +0000
commit607bff1ebe81e869697e228322da4c308e8753a5 (patch)
treeab9126adaba09e9c1cd436b1ca76c5ac3d67eb3c /Lib/test/test_pkgutil.py
parent6f34109384f3a78d5f4f8bdd418a89caca19631e (diff)
downloadcpython-git-607bff1ebe81e869697e228322da4c308e8753a5.tar.gz
Some tests did not pass on repeated calls (regrtest -R::)
Perform additional cleanup, mostly deleting from sys.modules, or clearing the warnings registry.
Diffstat (limited to 'Lib/test/test_pkgutil.py')
-rw-r--r--Lib/test/test_pkgutil.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py
index 4381f911bb..a14f09187a 100644
--- a/Lib/test/test_pkgutil.py
+++ b/Lib/test/test_pkgutil.py
@@ -48,6 +48,8 @@ class PkgutilTests(unittest.TestCase):
res2 = pkgutil.get_data(pkg, 'sub/res.txt')
self.assertEqual(res2, RESOURCE_DATA)
+ del sys.modules[pkg]
+
def test_getdata_zipfile(self):
zip = 'test_getdata_zipfile.zip'
pkg = 'test_getdata_zipfile'
@@ -74,6 +76,8 @@ class PkgutilTests(unittest.TestCase):
self.assertEqual(res2, RESOURCE_DATA)
del sys.path[0]
+ del sys.modules[pkg]
+
class PkgutilPEP302Tests(unittest.TestCase):
class MyTestLoader(object):