Some tests did not pass on repeated calls (regrtest -R::)
Perform additional cleanup, mostly deleting from sys.modules, or clearing the warnings registry.
diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py
index 4381f91..a14f091 100644
--- a/Lib/test/test_pkgutil.py
+++ b/Lib/test/test_pkgutil.py
@@ -48,6 +48,8 @@
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 @@
self.assertEqual(res2, RESOURCE_DATA)
del sys.path[0]
+ del sys.modules[pkg]
+
class PkgutilPEP302Tests(unittest.TestCase):
class MyTestLoader(object):