literal float tests
authorRobert Bradshaw <robertwb@math.washington.edu>
Tue, 20 Jan 2009 01:35:51 +0000 (17:35 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Tue, 20 Jan 2009 01:35:51 +0000 (17:35 -0800)
tests/run/literals.pyx

index e310860ad61fdfa624b9d68ae81228029cf494a4..973f45d764887f50739ebd77736bb24dc9394756 100644 (file)
@@ -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