projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
565253c
)
literal float tests
author
Robert Bradshaw
<robertwb@math.washington.edu>
Tue, 20 Jan 2009 01:35:51 +0000
(17:35 -0800)
committer
Robert Bradshaw
<robertwb@math.washington.edu>
Tue, 20 Jan 2009 01:35:51 +0000
(17:35 -0800)
tests/run/literals.pyx
patch
|
blob
|
history
diff --git
a/tests/run/literals.pyx
b/tests/run/literals.pyx
index e310860ad61fdfa624b9d68ae81228029cf494a4..973f45d764887f50739ebd77736bb24dc9394756 100644
(file)
--- 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