summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-04-18 23:31:33 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-04-18 23:31:33 (GMT)
commit607bff1ebe81e869697e228322da4c308e8753a5 (patch)
treeab9126adaba09e9c1cd436b1ca76c5ac3d67eb3c /Lib/test/regrtest.py
parent6f34109384f3a78d5f4f8bdd418a89caca19631e (diff)
downloadcpython-607bff1ebe81e869697e228322da4c308e8753a5.zip
cpython-607bff1ebe81e869697e228322da4c308e8753a5.tar.gz
cpython-607bff1ebe81e869697e228322da4c308e8753a5.tar.bz2
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/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 7ea8668..b092bd9 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -683,6 +683,11 @@ def dash_R_cleanup(fs, ps, pic, abcs):
import struct, filecmp
from distutils.dir_util import _path_created
+ # Clear the warnings registry, so they can be displayed again
+ for mod in sys.modules.values():
+ if hasattr(mod, '__warningregistry__'):
+ del mod.__warningregistry__
+
# Restore some original values.
warnings.filters[:] = fs
copy_reg.dispatch_table.clear()