summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-08-23 17:45:31 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-08-23 17:45:31 (GMT)
commit9d0eaac1fcebd13a981432848d8c64627634140e (patch)
treec71e50796cea0088efa5d3424be71077006d1a28
parent421a915003f98e4bdacd914f95200192e77fb10c (diff)
downloadcpython-9d0eaac1fcebd13a981432848d8c64627634140e.zip
cpython-9d0eaac1fcebd13a981432848d8c64627634140e.tar.gz
cpython-9d0eaac1fcebd13a981432848d8c64627634140e.tar.bz2
enable and fix TestTotalOrdering
-rw-r--r--Lib/test/test_functools.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
index 6e3533a..c5beba1 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,
)