Skip to content

Commit 85087fc

Browse files
pablogsalgodlygeek
authored andcommitted
Adapt to Textual 0.87.1
The new textual release has some changes: * We need to change how our tests get the rendered version of some Textual objects as now `render()` returns `RichVisual` instances. * Textual has a new theme so we need to regenerate our snapshots. * There was a regression in how focusing a widget while the app is still starting up behaves. This has been fixed upstream in Textualize/textual#5284 but our snapshots will not pass until the fix makes it into a release. Signed-off-by: Matt Wozniski <[email protected]>
1 parent beea5cd commit 85087fc

23 files changed

+2360
-2405
lines changed

tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from packaging import version
66

77
SNAPSHOT_MINIMUM_VERSIONS = {
8-
"textual": "0.81",
8+
"textual": "0.87.1",
99
"pytest-textual-snapshot": "1.0",
1010
}
1111

tests/unit/__snapshots__/test_tree_reporter/TestTUILooks.test_allocations_of_different_sizes.svg

+267-268
Loading

tests/unit/__snapshots__/test_tree_reporter/TestTUILooks.test_basic.svg

+138-139
Loading

tests/unit/__snapshots__/test_tree_reporter/TestTUILooks.test_basic_node_selected_leaf.svg

+141-143
Loading

tests/unit/__snapshots__/test_tree_reporter/TestTUILooks.test_basic_node_selected_not_leaf.svg

+142-143
Loading

tests/unit/__snapshots__/test_tree_reporter/TestTUILooks.test_biggest_allocations.svg

+99-101
Loading

tests/unit/__snapshots__/test_tree_reporter/TestTUILooks.test_hide_import_system.svg

+138-139
Loading

tests/unit/__snapshots__/test_tree_reporter/TestTUILooks.test_select_screen.svg

+141-143
Loading

tests/unit/__snapshots__/test_tree_reporter/TestTUILooks.test_show_uninteresting.svg

+139-140
Loading

tests/unit/__snapshots__/test_tree_reporter/TestTUILooks.test_show_uninteresting_and_hide_import_system.svg

+139-140
Loading

tests/unit/__snapshots__/test_tree_reporter/TestTUILooks.test_two_chains.svg

+139-140
Loading

tests/unit/__snapshots__/test_tree_reporter/TestTUILooks.test_two_chains_after_expanding_second.svg

+144-145
Loading

tests/unit/__snapshots__/test_tui_reporter/test_merge_threads.svg

+63-67
Loading

tests/unit/__snapshots__/test_tui_reporter/test_tui_basic[narrow-terminal-focus-header-long-snapshots].svg

+69-71
Loading

tests/unit/__snapshots__/test_tui_reporter/test_tui_basic[narrow-terminal-short-snapshots].svg

+67-68
Loading

tests/unit/__snapshots__/test_tui_reporter/test_tui_basic[very-wide-terminal-short-snapshots].svg

+70-74
Loading

tests/unit/__snapshots__/test_tui_reporter/test_tui_basic[wide-terminal-long-snapshots].svg

+74-77
Loading

tests/unit/__snapshots__/test_tui_reporter/test_tui_gradient.svg

+131-135
Loading

tests/unit/__snapshots__/test_tui_reporter/test_tui_pause[narrow-terminal-connected].svg

+62-65
Loading

tests/unit/__snapshots__/test_tui_reporter/test_tui_pause[narrow-terminal-disconnected].svg

+64-67
Loading

tests/unit/__snapshots__/test_tui_reporter/test_tui_pause[wider-terminal].svg

+68-71
Loading

tests/unit/__snapshots__/test_tui_reporter/test_unmerge_threads.svg

+63-67
Loading

tests/unit/test_tui_reporter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ async def run_before_wrapper(pilot) -> None:
140140

141141
def render_widget(widget: Widget) -> str:
142142
output = StringIO()
143-
rprint(widget.render(), file=output)
143+
rprint(widget.renderable, file=output)
144144
return output.getvalue()
145145

146146

0 commit comments

Comments
 (0)