add test for class with no operations defined

This commit is contained in:
Benjamin Peterson 2010-04-11 01:40:32 +00:00
parent ec6393f380
commit a11da59755

View file

@ -422,6 +422,12 @@ class TestTotalOrdering(unittest.TestCase):
self.assert_(A(2) <= A(2)) self.assert_(A(2) <= A(2))
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): def test_main(verbose=None):
test_classes = ( test_classes = (
TestPartial, TestPartial,