From a11da59755c27c7a74df90d08f6401b0c96be160 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 11 Apr 2010 01:40:32 +0000 Subject: [PATCH] add test for class with no operations defined --- Lib/test/test_functools.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 05e19b1399f..6e3533acd2a 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -422,6 +422,12 @@ class TestTotalOrdering(unittest.TestCase): self.assert_(A(2) <= A(2)) self.assert_(A(2) >= A(2)) + def test_no_operations_defined(self): + with self.assertRaises(ValueError): + @functools.total_ordering + class A: + pass + def test_main(verbose=None): test_classes = ( TestPartial,