From: Robert Bradshaw Date: Tue, 20 Jan 2009 01:35:51 +0000 (-0800) Subject: literal float tests X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b6bdc98a5adca6e36e6cef196359e71501728241;p=cython.git literal float tests --- diff --git a/tests/run/literals.pyx b/tests/run/literals.pyx index e310860a..973f45d7 100644 --- a/tests/run/literals.pyx +++ b/tests/run/literals.pyx @@ -1,5 +1,9 @@ __doc__ = u""" >>> foo() + >>> test_float(1./3) + True + >>> test_complex(1j/3) + True """ def foo(): @@ -46,3 +50,11 @@ with ' and " quotes""" q = "NameLikeString2" r = "99_percent_un_namelike" s = "Not an \escape" + + + +def test_float(x): + return x == 1./3 + +def test_complex(x): + return x == 0.3333333333333333j