Save a copy of sys.warnoptions in test_program.

This commit is contained in:
Ezio Melotti 2011-03-20 15:31:26 +02:00
parent 0123e055fa
commit 60c3c9f918
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ class TestCommandLineArgs(unittest.TestCase):
class FakeTP(unittest.TestProgram):
def parseArgs(self, *args, **kw): pass
def runTests(self, *args, **kw): pass
warnoptions = sys.warnoptions
warnoptions = sys.warnoptions[:]
try:
sys.warnoptions[:] = []
# no warn options, no arg -> default