diff --git a/docs/examples/widgets/data_table.py b/docs/examples/widgets/data_table.py index f2671dd48..87b2c0ce8 100644 --- a/docs/examples/widgets/data_table.py +++ b/docs/examples/widgets/data_table.py @@ -2,7 +2,7 @@ import csv import io from textual.app import App, ComposeResult -from textual.widgets import DataTable, Header +from textual.widgets import DataTable CSV = """lane,swimmer,country,time 4,Joseph Schooling,Singapore,50.39 @@ -17,7 +17,6 @@ CSV = """lane,swimmer,country,time class TableApp(App): def compose(self) -> ComposeResult: - yield Header() yield DataTable() def on_mount(self) -> None: diff --git a/tests/snapshot_tests/test_snapshots.py b/tests/snapshot_tests/test_snapshots.py index 71b02371e..5831e0b78 100644 --- a/tests/snapshot_tests/test_snapshots.py +++ b/tests/snapshot_tests/test_snapshots.py @@ -2,10 +2,12 @@ from pathlib import Path import pytest -# --- Layout related stuff --- +from textual.app import App from textual.widgets import Input +# --- Layout related stuff --- + def test_grid_layout_basic(snap_compare): assert snap_compare("docs/examples/guide/layout/grid_layout1.py") @@ -63,7 +65,8 @@ def test_input_and_focus(snap_compare): assert snap_compare("docs/examples/widgets/input.py", press=press) # Assert that the state of the Input is what we'd expect - input: Input = snap_compare.app.query_one(Input) + app: App = snap_compare.app + input: Input = app.query_one(Input) assert input.value == "Darren" assert input.cursor_position == 6