]> granicus.if.org Git - python/commitdiff
Save a copy of sys.warnoptions in test_program.
authorEzio Melotti <ezio.melotti@gmail.com>
Sun, 20 Mar 2011 13:31:26 +0000 (15:31 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Sun, 20 Mar 2011 13:31:26 +0000 (15:31 +0200)
Lib/unittest/test/test_program.py

index a50a2452c2cddc403b0565e8e6931b5995e74f6d..d5d0f5a71c12f3b5afd43cd7fd795eeccef05540 100644 (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