From 150a6640f5f63d2dd32e823b619b6afdf3d1b8c1 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 28 Feb 2001 22:50:15 +0000 Subject: Fix filter for SyntaxErrors --- Lib/test/test_global.py | 8 ++++---- 1 file 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="") def compile_and_catch_warning(text): try: compile(text, "", "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(): -- cgit v0.12