Skip to content

Commit 8a6fc05

Browse files
CPython developersyouknowone
authored andcommitted
Update test_contains from CPython 3.10.5
1 parent 45e6fb1 commit 8a6fc05

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Lib/test/test_contains.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from collections import deque
22
import unittest
3+
from test.support import NEVER_EQ
34

45

56
class base_set:
@@ -70,13 +71,7 @@ def test_nonreflexive(self):
7071
# containment and equality tests involving elements that are
7172
# not necessarily equal to themselves
7273

73-
class MyNonReflexive(object):
74-
def __eq__(self, other):
75-
return False
76-
def __hash__(self):
77-
return 28
78-
79-
values = float('nan'), 1, None, 'abc', MyNonReflexive()
74+
values = float('nan'), 1, None, 'abc', NEVER_EQ
8075
constructors = list, tuple, dict.fromkeys, set, frozenset, deque
8176
for constructor in constructors:
8277
container = constructor(values)

0 commit comments

Comments
 (0)