Merged revisions 76794 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76794 | benjamin.peterson | 2009-12-13 10:36:53 -0600 (Sun, 13 Dec 2009) | 2 lines

  fix the ignoring of __cmp__ method on metaclasses #7491
........
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index cef7d47..e9a5057 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1198,6 +1198,15 @@
         # This used to crash
         self.assertRaises(TypeError, MyABC.a.__set__, u, 3)
 
+    def test_metaclass_cmp(self):
+        # See bug 7491.
+        class M(type):
+            def __cmp__(self, other):
+                return -1
+        class X(object):
+            __metaclass__ = M
+        self.assertTrue(X < M)
+
     def test_dynamics(self):
         # Testing class attribute propagation...
         class D(object):