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:

* There are some changes that we need to do to 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 is something going on with horizontal scroll bars. We have
  opened Textualize/textual#5284 but looks
  like this may be expected.
  • Loading branch information
pablogsal committed Nov 25, 2024
1 parent beea5cd commit 28e31ca
Show file tree
Hide file tree
Showing 23 changed files with 2,361 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.
3 changes: 2 additions & 1 deletion tests/unit/test_tui_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import pytest
from rich import print as rprint
from rich.console import RenderableType
from textual.app import App
from textual.coordinate import Coordinate
from textual.pilot import Pilot
Expand Down Expand Up @@ -140,7 +141,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 28e31ca

Please sign in to comment.