From 9d0eaac1fcebd13a981432848d8c64627634140e Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 23 Aug 2010 17:45:31 +0000 Subject: [PATCH] enable and fix TestTotalOrdering --- Lib/test/test_functools.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 6e3533acd2a..c5beba1d1e5 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -413,14 +413,14 @@ class TestTotalOrdering(unittest.TestCase): def test_total_ordering_no_overwrite(self): # new methods should not overwrite existing @functools.total_ordering - class A(int): + class A(str): pass - self.assert_(A(1) < A(2)) - self.assert_(A(2) > A(1)) - self.assert_(A(1) <= A(2)) - self.assert_(A(2) >= A(1)) - self.assert_(A(2) <= A(2)) - self.assert_(A(2) >= A(2)) + self.assert_(A("a") < A("b")) + self.assert_(A("b") > A("a")) + self.assert_(A("a") <= A("b")) + self.assert_(A("b") >= A("a")) + self.assert_(A("b") <= A("b")) + self.assert_(A("b") >= A("b")) def test_no_operations_defined(self): with self.assertRaises(ValueError): @@ -434,6 +434,7 @@ def test_main(verbose=None): TestPartialSubclass, TestPythonPartial, TestUpdateWrapper, + TestTotalOrdering, TestWraps, TestReduce, )