summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_global.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-02-28 22:50:15 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-02-28 22:50:15 (GMT)
commit150a6640f5f63d2dd32e823b619b6afdf3d1b8c1 (patch)
tree9dd1df1bcd4f93981b288310df7982281cede14e /Lib/test/test_global.py
parent3da989c6bc0c80bd75547dbd8efc5a9deb29eff5 (diff)
downloadcpython-150a6640f5f63d2dd32e823b619b6afdf3d1b8c1.zip
cpython-150a6640f5f63d2dd32e823b619b6afdf3d1b8c1.tar.gz
cpython-150a6640f5f63d2dd32e823b619b6afdf3d1b8c1.tar.bz2
Fix filter for SyntaxErrors
Diffstat (limited to 'Lib/test/test_global.py')
-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():