bpo-37685: Use singletons ALWAYS_EQ and NEVER_EQ in more tests. (GH-15167)
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 @@
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 @@
return len(self._seq)
nan = float('nan')
- obj = CustomEqualObject()
+ obj = support.NEVER_EQ
seq = CustomSequence([nan, obj, nan])
containers = [
seq,