From: Stefan Behnel Date: Tue, 30 Dec 2008 12:08:45 +0000 (+0100) Subject: Py3 test case fix X-Git-Tag: 0.11-beta~54 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9279f057b7a40a422a5819c7d2276e001ebc1ff9;p=cython.git Py3 test case fix --- diff --git a/tests/run/if.pyx b/tests/run/if.pyx index 87123ae0..a4922051 100644 --- a/tests/run/if.pyx +++ b/tests/run/if.pyx @@ -54,10 +54,15 @@ def h(a, b): x = 3 return x +try: + import __builtin__ as builtins +except ImportError: + import builtins + def i(a, b): x = 0 - if str(a).upper() == u"1": + if builtins.str(a).upper() == u"1": x = 1 - if str(a+b).lower() not in (u"1", u"3"): + if builtins.str(a+b).lower() not in (u"1", u"3"): x = 2 return x