()
| 319 | |
| 320 | |
| 321 | def test_movement(): |
| 322 | v = view.View() |
| 323 | with taddons.context(): |
| 324 | v.go(0) |
| 325 | v.add( |
| 326 | [ |
| 327 | tflow.tflow(), |
| 328 | tflow.tflow(), |
| 329 | tflow.tflow(), |
| 330 | tflow.tflow(), |
| 331 | tflow.tflow(), |
| 332 | ] |
| 333 | ) |
| 334 | assert v.focus.index == 0 |
| 335 | v.go(-1) |
| 336 | assert v.focus.index == 4 |
| 337 | v.go(0) |
| 338 | assert v.focus.index == 0 |
| 339 | v.go(1) |
| 340 | assert v.focus.index == 1 |
| 341 | v.go(999) |
| 342 | assert v.focus.index == 4 |
| 343 | v.go(-999) |
| 344 | assert v.focus.index == 0 |
| 345 | |
| 346 | v.focus_next() |
| 347 | assert v.focus.index == 1 |
| 348 | v.focus_prev() |
| 349 | assert v.focus.index == 0 |
| 350 | |
| 351 | v.clear() |
| 352 | v.focus_next() |
| 353 | assert v.focus.index is None |
| 354 | v.focus_prev() |
| 355 | assert v.focus.index is None |
| 356 | |
| 357 | |
| 358 | def test_duplicate(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…