From b6bdc98a5adca6e36e6cef196359e71501728241 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Mon, 19 Jan 2009 17:35:51 -0800 Subject: [PATCH] literal float tests --- tests/run/literals.pyx | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- 2.26.2