only use cmp() in 2.x

--HG--
branch : trunk
This commit is contained in:
Benjamin Peterson 2009-08-29 16:02:59 -05:00
parent ad0c2edfd2
commit a051eb1a05
1 changed files with 3 additions and 2 deletions

View File

@ -17,8 +17,9 @@ class TestCollector:
assert isinstance(fn2, py.test.collect.Function)
assert fn1 == fn2
assert fn1 != modcol
assert cmp(fn1, fn2) == 0
assert fn1 != modcol
if py.std.sys.version_info < (3, 0):
assert cmp(fn1, fn2) == 0
assert hash(fn1) == hash(fn2)
fn3 = modcol.collect_by_name("test_fail")