projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2b8184
)
extend test
author
Stefan Behnel
<stefan_ml@behnel.de>
Sat, 11 Jan 2014 06:09:01 +0000
(07:09 +0100)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Sat, 11 Jan 2014 06:09:01 +0000
(07:09 +0100)
tests/run/richcmp_str_equals.py
patch
|
blob
|
history
diff --git
a/tests/run/richcmp_str_equals.py
b/tests/run/richcmp_str_equals.py
index 2ac59859aed35159b79bb9e62008c8a5e69ff525..f6539f4a8bdf464cf9925048956bb1fbc1eeebfb 100644
(file)
--- a/
tests/run/richcmp_str_equals.py
+++ b/
tests/run/richcmp_str_equals.py
@@
-11,12
+11,16
@@
class testobj(object):
def __eq__(self, other):
return plop()
-def test_equals():
+def test_equals(
x
):
"""
- >>> result = test_equals()
+ >>> x = testobj()
+ >>> result = test_equals(x)
>>> isinstance(result, plop)
True
+ >>> test_equals('hihi')
+ False
+ >>> test_equals('coucou')
+ True
"""
- blah = testobj()
- eq = blah == 'coucou' # not every str equals returns a bool ...
+ eq = x == 'coucou' # not every str equals returns a bool ...
return eq