Skip to content

Commit db0335b

Browse files
committed
test: fix failing tests when run in parallel
Fixes Textualize#5327. Normally when running tests with Textual, the default size of the simulated app is 80x24. However it seems when tests are run in parallel with xdist on Python 3.13, `app.console.height` returns the _actual_ height of the terminal, causing tests to fail.
1 parent dc71564 commit db0335b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/text_area/test_selection_bindings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ async def test_cursor_page_down(app: TextAreaApp):
255255
await pilot.press("pagedown")
256256
margin = 2
257257
assert text_area.selection == Selection.cursor(
258-
(app.console.height - 1 - margin, 1)
258+
(app.size.height - margin, 1)
259259
)
260260

261261

@@ -268,7 +268,7 @@ async def test_cursor_page_up(app: TextAreaApp):
268268
await pilot.press("pageup")
269269
margin = 2
270270
assert text_area.selection == Selection.cursor(
271-
(100 - app.console.height + 1 + margin, 1)
271+
(100 - app.size.height + margin, 1)
272272
)
273273

274274

0 commit comments

Comments
 (0)