Skip to content

Commit

Permalink
Adapt to Textual 0.87.1
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pablogsal authored and godlygeek committed Nov 27, 2024
1 parent beea5cd commit 85087fc
Show file tree
Hide file tree
Showing 23 changed files with 2,360 additions and 2,405 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from packaging import version

SNAPSHOT_MINIMUM_VERSIONS = {
"textual": "0.81",
"textual": "0.87.1",
"pytest-textual-snapshot": "1.0",
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
277 changes: 138 additions & 139 deletions tests/unit/__snapshots__/test_tree_reporter/TestTUILooks.test_basic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
130 changes: 63 additions & 67 deletions tests/unit/__snapshots__/test_tui_reporter/test_merge_threads.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
266 changes: 131 additions & 135 deletions tests/unit/__snapshots__/test_tui_reporter/test_tui_gradient.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
130 changes: 63 additions & 67 deletions tests/unit/__snapshots__/test_tui_reporter/test_unmerge_threads.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/unit/test_tui_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async def run_before_wrapper(pilot) -> None:

def render_widget(widget: Widget) -> str:
output = StringIO()
rprint(widget.render(), file=output)
rprint(widget.renderable, file=output)
return output.getvalue()


Expand Down

0 comments on commit 85087fc

Please sign in to comment.