summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_copy.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_copy.py')
-rw-r--r--Lib/test/test_copy.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py
index d2899bd..be334cc 100644
--- a/Lib/test/test_copy.py
+++ b/Lib/test/test_copy.py
@@ -435,6 +435,7 @@ class TestCopy(unittest.TestCase):
return (C, (), self.__dict__)
def __cmp__(self, other):
return cmp(self.__dict__, other.__dict__)
+ __hash__ = None # Silence Py3k warning
x = C()
x.foo = [42]
y = copy.copy(x)
@@ -451,6 +452,7 @@ class TestCopy(unittest.TestCase):
self.__dict__.update(state)
def __cmp__(self, other):
return cmp(self.__dict__, other.__dict__)
+ __hash__ = None # Silence Py3k warning
x = C()
x.foo = [42]
y = copy.copy(x)
@@ -477,6 +479,7 @@ class TestCopy(unittest.TestCase):
def __cmp__(self, other):
return (cmp(list(self), list(other)) or
cmp(self.__dict__, other.__dict__))
+ __hash__ = None # Silence Py3k warning
x = C([[1, 2], 3])
y = copy.copy(x)
self.assertEqual(x, y)
@@ -494,6 +497,7 @@ class TestCopy(unittest.TestCase):
def __cmp__(self, other):
return (cmp(dict(self), list(dict)) or
cmp(self.__dict__, other.__dict__))
+ __hash__ = None # Silence Py3k warning
x = C([("foo", [1, 2]), ("bar", 3)])
y = copy.copy(x)
self.assertEqual(x, y)