diff options
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r-- | Lib/test/test_support.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index d260fc5..2829c55 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -244,13 +244,13 @@ def sortdict(dict): withcommas = ", ".join(reprpairs) return "{%s}" % withcommas -def check_syntax(statement): +def check_syntax_error(testcase, statement): try: - compile(statement, '<string>', 'exec') + compile(statement, '<test string>', 'exec') except SyntaxError: pass else: - print 'Missing SyntaxError: "%s"' % statement + testcase.fail('Missing SyntaxError: "%s"' % statement) def open_urlresource(url): import urllib, urlparse |