diff options
author | Brett Cannon <bcannon@gmail.com> | 2007-08-17 20:16:15 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2007-08-17 20:16:15 (GMT) |
commit | 855da6cbbfe86d180abf0d2e03ccf1690cfbcaf4 (patch) | |
tree | 48795c7b08c3d217af7b544e7ee98c6b4edf9e73 /Lib/test | |
parent | 7f686fce40c37a0b8117abb244ec2763cbcd2b58 (diff) | |
download | cpython-855da6cbbfe86d180abf0d2e03ccf1690cfbcaf4.zip cpython-855da6cbbfe86d180abf0d2e03ccf1690cfbcaf4.tar.gz cpython-855da6cbbfe86d180abf0d2e03ccf1690cfbcaf4.tar.bz2 |
Make test_warnings re-entrant.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_warnings.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_warnings.py b/Lib/test/test_warnings.py index cca6329..66246cf 100644 --- a/Lib/test/test_warnings.py +++ b/Lib/test/test_warnings.py @@ -1,5 +1,6 @@ import warnings import os +import sys import unittest from test import test_support @@ -101,6 +102,10 @@ def test_main(verbose=None): # to test_main (regrtest -R). if '__warningregistry__' in globals(): del globals()['__warningregistry__'] + if hasattr(warning_tests, '__warningregistry__'): + del warning_tests.__warningregistry__ + if hasattr(sys, '__warningregistry__'): + del sys.__warningregistry__ test_support.run_unittest(TestModule) if __name__ == "__main__": |