Skip to content

Commit

Permalink
Fix tests to comply with new API.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigogiraoserrao committed Sep 21, 2023
1 parent 6607391 commit 4dd80e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/input/test_input_mouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def compose(self) -> ComposeResult:
(TEXT_SINGLE, 10, 10),
(TEXT_SINGLE, len(TEXT_SINGLE) - 1, len(TEXT_SINGLE) - 1),
(TEXT_SINGLE, len(TEXT_SINGLE), len(TEXT_SINGLE)),
(TEXT_SINGLE, len(TEXT_SINGLE) * 2, len(TEXT_SINGLE)),
(TEXT_SINGLE, len(TEXT_SINGLE) + 10, len(TEXT_SINGLE)),
# Double-width characters
(TEXT_DOUBLE, 0, 0),
(TEXT_DOUBLE, 1, 0),
Expand All @@ -55,7 +55,7 @@ def compose(self) -> ComposeResult:
(TEXT_MIXED, 13, 9),
(TEXT_MIXED, 14, 9),
(TEXT_MIXED, 15, 10),
(TEXT_MIXED, 1000, 10),
(TEXT_MIXED, 60, 10),
),
)
async def test_mouse_clicks_within(text, click_at, should_land):
Expand Down
1 change: 1 addition & 0 deletions tests/snapshot_tests/test_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ def test_blur_on_disabled(snap_compare):
def test_tooltips_in_compound_widgets(snap_compare):
# https://github.com/Textualize/textual/issues/2641
async def run_before(pilot) -> None:
await pilot.pause()
await pilot.hover("ProgressBar")
await pilot.pause(0.3)
await pilot.pause()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ async def test_hover_mouse_leave():
await pilot.hover(DataTable, offset=Offset(1, 1))
assert table._show_hover_cursor
# Move our cursor away from the DataTable, and the hover cursor is hidden
await pilot.hover(DataTable, offset=Offset(-1, -1))
await pilot.hover(DataTable, offset=Offset(20, 20))
assert not table._show_hover_cursor


Expand Down

0 comments on commit 4dd80e9

Please sign in to comment.