summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_scope.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-12-15 18:04:10 (GMT)
committerGuido van Rossum <guido@python.org>2001-12-15 18:04:10 (GMT)
commit796e1e0b30cda1362b0c6b89a079ad0cbf8804be (patch)
tree40427daebda6e7028f66f9deec4ac7c6951b80a5 /Lib/test/test_scope.py
parent2b8235e485f875d95809b0092c52dc6c49ad3130 (diff)
downloadcpython-796e1e0b30cda1362b0c6b89a079ad0cbf8804be.zip
cpython-796e1e0b30cda1362b0c6b89a079ad0cbf8804be.tar.gz
cpython-796e1e0b30cda1362b0c6b89a079ad0cbf8804be.tar.bz2
Don't call resetwarnings(). Be more restrictive in what we filter out
instead.
Diffstat (limited to 'Lib/test/test_scope.py')
-rw-r--r--Lib/test/test_scope.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index dde169a..bb29f8b 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -1,7 +1,7 @@
from test_support import verify, TestFailed, check_syntax
import warnings
-warnings.filterwarnings("ignore", "import *")
+warnings.filterwarnings("ignore", r"import \*", SyntaxWarning, "<string>")
print "1. simple nesting"
@@ -491,8 +491,6 @@ except TypeError:
else:
print "exec should have failed, because code contained free vars"
-warnings.resetwarnings()
-
print "21. list comprehension with local variables"
try: