From: Stefan Behnel Date: Sun, 14 Mar 2010 12:00:23 +0000 (+0100) Subject: fix tests after changing error output X-Git-Tag: 0.13.beta0~292 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2743fb0a27a9fbc346c81769c783916238abc391;p=cython.git fix tests after changing error output --- diff --git a/Cython/Compiler/Options.py b/Cython/Compiler/Options.py index 08a38d32..270e19ff 100644 --- a/Cython/Compiler/Options.py +++ b/Cython/Compiler/Options.py @@ -116,13 +116,13 @@ def parse_directive_value(name, value, relaxed_bool=False): value = value.lower() if value in ("true", "yes"): return True elif value in ("false", "no"): return False - raise ValueError("%s directive must be set to True or False, got %r" % ( + raise ValueError("%s directive must be set to True or False, got '%s'" % ( name, orig_value)) elif type is int: try: return int(value) except ValueError: - raise ValueError("%s directive must be set to an integer, got %r" % ( + raise ValueError("%s directive must be set to an integer, got '%s'" % ( name, orig_value)) elif type is str: return str(value) diff --git a/tests/errors/e_directives.pyx b/tests/errors/e_directives.pyx index f63270fd..f7f777ac 100644 --- a/tests/errors/e_directives.pyx +++ b/tests/errors/e_directives.pyx @@ -9,7 +9,6 @@ print 3 # cython: boundscheck = true _ERRORS = u""" -3:0: boundscheck directive must be set to True or False -4:0: boundscheck directive must be set to True or False +3:0: boundscheck directive must be set to True or False, got 'true' +4:0: boundscheck directive must be set to True or False, got '9' """ -