[Python-checkins] r81750 - in python/branches/release26-maint: Lib/test/test_py3kwarn.py
mark.dickinson
python-checkins at python.org
Sat Jun 5 15:24:04 CEST 2010
Author: mark.dickinson
Date: Sat Jun 5 15:24:04 2010
New Revision: 81750
Log:
Merged revisions 81749 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81749 | mark.dickinson | 2010-06-05 14:18:33 +0100 (Sat, 05 Jun 2010) | 2 lines
Fix test_py3kwarn not to test for __cmp__-related DeprecationWarning.
........
Modified:
python/branches/release26-maint/ (props changed)
python/branches/release26-maint/Lib/test/test_py3kwarn.py
Modified: python/branches/release26-maint/Lib/test/test_py3kwarn.py
==============================================================================
--- python/branches/release26-maint/Lib/test/test_py3kwarn.py (original)
+++ python/branches/release26-maint/Lib/test/test_py3kwarn.py Sat Jun 5 15:24:04 2010
@@ -248,9 +248,7 @@
# With object as the base class
class WarnOnlyCmp(object):
def __cmp__(self, other): pass
- self.assertEqual(len(w.warnings), 1)
- self.assertWarning(None, w,
- "Overriding __cmp__ blocks inheritance of __hash__ in 3.x")
+ self.assertEqual(len(w.warnings), 0)
w.reset()
class WarnOnlyEq(object):
def __eq__(self, other): pass
@@ -261,9 +259,7 @@
class WarnCmpAndEq(object):
def __cmp__(self, other): pass
def __eq__(self, other): pass
- self.assertEqual(len(w.warnings), 2)
- self.assertWarning(None, w.warnings[0],
- "Overriding __cmp__ blocks inheritance of __hash__ in 3.x")
+ self.assertEqual(len(w.warnings), 1)
self.assertWarning(None, w,
"Overriding __eq__ blocks inheritance of __hash__ in 3.x")
w.reset()
@@ -277,9 +273,7 @@
def __hash__(self): pass
class WarnOnlyCmp(DefinesAllThree):
def __cmp__(self, other): pass
- self.assertEqual(len(w.warnings), 1)
- self.assertWarning(None, w,
- "Overriding __cmp__ blocks inheritance of __hash__ in 3.x")
+ self.assertEqual(len(w.warnings), 0)
w.reset()
class WarnOnlyEq(DefinesAllThree):
def __eq__(self, other): pass
@@ -290,9 +284,7 @@
class WarnCmpAndEq(DefinesAllThree):
def __cmp__(self, other): pass
def __eq__(self, other): pass
- self.assertEqual(len(w.warnings), 2)
- self.assertWarning(None, w.warnings[0],
- "Overriding __cmp__ blocks inheritance of __hash__ in 3.x")
+ self.assertEqual(len(w.warnings), 1)
self.assertWarning(None, w,
"Overriding __eq__ blocks inheritance of __hash__ in 3.x")
w.reset()
More information about the Python-checkins
mailing list