From 60c3c9f91820ee90c9ebc15addae15bbef17bd9b Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sun, 20 Mar 2011 15:31:26 +0200 Subject: Save a copy of sys.warnoptions in test_program. --- Lib/unittest/test/test_program.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/unittest/test/test_program.py b/Lib/unittest/test/test_program.py index a50a245..d5d0f5a 100644 --- a/Lib/unittest/test/test_program.py +++ b/Lib/unittest/test/test_program.py @@ -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 -- cgit v0.12