Skip to content

Commit 83d1ad8

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

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎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)