summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_global.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_global.py b/Lib/test/test_global.py
index 66f2a6e..c60d0c7 100644
--- a/Lib/test/test_global.py
+++ b/Lib/test/test_global.py
@@ -4,15 +4,15 @@ from test_support import check_syntax
import warnings
-warnings.filterwarnings("error", category=SyntaxWarning, module=__name__)
+warnings.filterwarnings("error", module="<test code>")
def compile_and_catch_warning(text):
try:
compile(text, "<test code>", "exec")
- except SyntaxWarning, msg:
- print "got SyntaxWarning as expected"
+ except SyntaxError, msg:
+ print "got SyntaxError as expected"
else:
- print "expected SyntaxWarning"
+ print "expected SyntaxError"
prog_text_1 = """
def wrong1():