Add new failing test for #1743
This commit is contained in:
parent
e819e97c29
commit
6f2b13bd5b
1 changed files with 24 additions and 0 deletions
|
|
@ -51,6 +51,18 @@ async def test_move_child_before_itself() -> None:
|
|||
pilot.app.screen.move_child(child, before=child)
|
||||
|
||||
|
||||
@pytest.mark.xfail(
|
||||
strict=True, reason="https://github.com/Textualize/textual/issues/1743"
|
||||
)
|
||||
async def test_move_child_before_itself_numerically() -> None:
|
||||
"""Test moving a widget before itself by numeric index."""
|
||||
|
||||
async with App().run_test() as pilot:
|
||||
child = Widget(Widget())
|
||||
await pilot.app.mount(child)
|
||||
pilot.app.screen.move_child(child, before=0)
|
||||
|
||||
|
||||
async def test_move_child_after_itself() -> None:
|
||||
"""Test moving a widget after itself."""
|
||||
# Regression test for https://github.com/Textualize/textual/issues/1743
|
||||
|
|
@ -60,6 +72,18 @@ async def test_move_child_after_itself() -> None:
|
|||
pilot.app.screen.move_child(child, after=child)
|
||||
|
||||
|
||||
@pytest.mark.xfail(
|
||||
strict=True, reason="https://github.com/Textualize/textual/issues/1743"
|
||||
)
|
||||
async def test_move_child_after_itself_numerically() -> None:
|
||||
"""Test moving a widget after itself by numeric index."""
|
||||
# Regression test for https://github.com/Textualize/textual/issues/1743
|
||||
async with App().run_test() as pilot:
|
||||
child = Widget(Widget())
|
||||
await pilot.app.mount(child)
|
||||
pilot.app.screen.move_child(child, after=0)
|
||||
|
||||
|
||||
async def test_move_past_end_of_child_list() -> None:
|
||||
"""Test attempting to move past the end of the child list."""
|
||||
async with App().run_test() as pilot:
|
||||
|
|
|
|||
Loading…
Reference in a new issue