From: Ezio Melotti Date: Sun, 20 Mar 2011 13:31:26 +0000 (+0200) Subject: Save a copy of sys.warnoptions in test_program. X-Git-Tag: v3.2.1b1~250 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=60c3c9f91820ee90c9ebc15addae15bbef17bd9b;p=thirdparty%2FPython%2Fcpython.git Save a copy of sys.warnoptions in test_program. --- diff --git a/Lib/unittest/test/test_program.py b/Lib/unittest/test/test_program.py index a50a2452c2cd..d5d0f5a71c12 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