Kaydet (Commit) 855da6cb authored tarafından Brett Cannon's avatar Brett Cannon

Make test_warnings re-entrant.

üst 7f686fce
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__":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment