[Python-checkins] r79944 - python/trunk/Lib/test/test_functools.py

benjamin.peterson python-checkins at python.org
Sun Apr 11 03:40:33 CEST 2010


Author: benjamin.peterson
Date: Sun Apr 11 03:40:32 2010
New Revision: 79944

Log:
add test for class with no operations defined

Modified:
   python/trunk/Lib/test/test_functools.py

Modified: python/trunk/Lib/test/test_functools.py
==============================================================================
--- python/trunk/Lib/test/test_functools.py	(original)
+++ python/trunk/Lib/test/test_functools.py	Sun Apr 11 03:40:32 2010
@@ -422,6 +422,12 @@
         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,


More information about the Python-checkins mailing list