Can we get the index of a widget in the list?
()
| 65 | |
| 66 | |
| 67 | async def test_index(): |
| 68 | """Can we get the index of a widget in the list?""" |
| 69 | widget = Widget() |
| 70 | nodes = NodeList() |
| 71 | with pytest.raises(ValueError): |
| 72 | _ = nodes.index(widget) |
| 73 | nodes._append(widget) |
| 74 | assert nodes.index(widget) == 0 |
| 75 | |
| 76 | |
| 77 | async def test_remove(): |