summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_collections.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-08-08 05:43:18 (GMT)
committerGitHub <noreply@github.com>2019-08-08 05:43:18 (GMT)
commit7d44e7a4563072d0fad00427b76b94cad61c38ae (patch)
tree3c5244b17e90529d6f10c8c54bfadf4caa31cb38 /Lib/test/test_collections.py
parent662db125cddbca1db68116c547c290eb3943d98e (diff)
downloadcpython-7d44e7a4563072d0fad00427b76b94cad61c38ae.zip
cpython-7d44e7a4563072d0fad00427b76b94cad61c38ae.tar.gz
cpython-7d44e7a4563072d0fad00427b76b94cad61c38ae.tar.bz2
bpo-37685: Use singletons ALWAYS_EQ and NEVER_EQ in more tests. (GH-15167)
Diffstat (limited to 'Lib/test/test_collections.py')
-rw-r--r--Lib/test/test_collections.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 0119c77..7f01de6 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -1472,9 +1472,6 @@ class TestCollectionABCs(ABCTestCase):
def test_issue26915(self):
# Container membership test should check identity first
- class CustomEqualObject:
- def __eq__(self, other):
- return False
class CustomSequence(Sequence):
def __init__(self, seq):
self._seq = seq
@@ -1484,7 +1481,7 @@ class TestCollectionABCs(ABCTestCase):
return len(self._seq)
nan = float('nan')
- obj = CustomEqualObject()
+ obj = support.NEVER_EQ
seq = CustomSequence([nan, obj, nan])
containers = [
seq,