summaryrefslogtreecommitdiff
path: root/Lib/test/test_py3kwarn.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-06-05 13:24:04 +0000
committerMark Dickinson <dickinsm@gmail.com>2010-06-05 13:24:04 +0000
commit3f9181143adf139be20f217239d471ee881b52ca (patch)
tree7e64c329c226cb75dad0433398b073a92d766741 /Lib/test/test_py3kwarn.py
parent3bf9f1a4e969b1649a3b0317fddfad9d0b36043d (diff)
downloadcpython-git-3f9181143adf139be20f217239d471ee881b52ca.tar.gz
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. ........
Diffstat (limited to 'Lib/test/test_py3kwarn.py')
-rw-r--r--Lib/test/test_py3kwarn.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index 077941a79b..da222566a4 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -248,9 +248,7 @@ class TestPy3KWarnings(unittest.TestCase):
# 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 TestPy3KWarnings(unittest.TestCase):
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 @@ class TestPy3KWarnings(unittest.TestCase):
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 TestPy3KWarnings(unittest.TestCase):
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()