summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_warnings.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-04-09 08:36:46 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-04-09 08:36:46 (GMT)
commitce4a9c901905624216bc5ae7ae631ecb94c2d66e (patch)
tree50069f3281cc062383a958a366c8b24763ddefe2 /Lib/test/test_warnings.py
parentaa34b6c2e32d3ff93ffe48fe6a67e87a28a3eed2 (diff)
downloadcpython-ce4a9c901905624216bc5ae7ae631ecb94c2d66e.zip
cpython-ce4a9c901905624216bc5ae7ae631ecb94c2d66e.tar.gz
cpython-ce4a9c901905624216bc5ae7ae631ecb94c2d66e.tar.bz2
Fix tests so they pass in -R mode
Diffstat (limited to 'Lib/test/test_warnings.py')
-rw-r--r--Lib/test/test_warnings.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_warnings.py b/Lib/test/test_warnings.py
index b7061c1..5a3f521 100644
--- a/Lib/test/test_warnings.py
+++ b/Lib/test/test_warnings.py
@@ -84,5 +84,9 @@ class TestModule(unittest.TestCase):
def test_main(verbose=None):
test_support.run_unittest(TestModule)
+# Obscure hack so that this test passes after reloads (regrtest -R).
+if '__warningregistry__' in globals():
+ del globals()['__warningregistry__']
+
if __name__ == "__main__":
test_main(verbose=True)