8000 Update test_operator.py to 3.12 (#5194) · RustPython/RustPython@83d1ad8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 83d1ad8

Browse files
authored
Update test_operator.py to 3.12 (#5194)
1 parent 7f02324 commit 83d1ad8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_operator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ def test_indexOf(self):
208208
nan = float("nan")
209209
self.assertEqual(operator.indexOf([nan, nan, 21], nan), 0)
210210
self.assertEqual(operator.indexOf([{}, 1, {}, 2], {}), 0)
211+
it = iter('leave the iterator at exactly the position after the match')
212+
self.assertEqual(operator.indexOf(it, 'a'), 2)
213+
self.assertEqual(next(it), 'v')
211214

212215
def test_invert(self):
213216
operator = self.module

0 commit comments

Comments
 (0)
0