| 1810 | # Test that an object with __getitem__ but no __len__ works. |
| 1811 | # This covers the except (IndexError, TypeError) block in select() |
| 1812 | class IndexableNoLen: |
| 1813 | def __getitem__(self, item: int) -> str: |
| 1814 | if item == 0: |
| 1815 | return "value" |
| 1816 | raise IndexError |
| 1817 | |
| 1818 | # Mock read_input to return '1' |
| 1819 | read_input_mock = mock.MagicMock(name="read_input", return_value="1") |
no outgoing calls
searching dependent graphs…