From a051eb1a05ff6f0f60aff9d6f2dee92c21909e78 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 29 Aug 2009 16:02:59 -0500 Subject: [PATCH] only use cmp() in 2.x --HG-- branch : trunk --- py/test/testing/test_collect.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/py/test/testing/test_collect.py b/py/test/testing/test_collect.py index e18e27101..a32f176db 100644 --- a/py/test/testing/test_collect.py +++ b/py/test/testing/test_collect.py @@ -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")