summaryrefslogtreecommitdiff
path: root/Lib/test/test_warnings.py
diff options
context:
space:
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 b7061c1b5f..5a3f521631 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)