[Python-checkins] r57160 - python/trunk/Lib/test/test_warnings.py
brett.cannon
python-checkins at python.org
Fri Aug 17 22:16:24 CEST 2007
Author: brett.cannon
Date: Fri Aug 17 22:16:15 2007
New Revision: 57160
Modified:
python/trunk/Lib/test/test_warnings.py
Log:
Make test_warnings re-entrant.
Modified: python/trunk/Lib/test/test_warnings.py
==============================================================================
--- python/trunk/Lib/test/test_warnings.py (original)
+++ python/trunk/Lib/test/test_warnings.py Fri Aug 17 22:16:15 2007
@@ -1,5 +1,6 @@
import warnings
import os
+import sys
import unittest
from test import test_support
@@ -101,6 +102,10 @@
# 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__":
More information about the Python-checkins
mailing list