Fix data-table snapshot

This commit is contained in:
Darren Burns
2022-10-24 15:16:47 +01:00
parent 041bb35014
commit d02e6e94b0
2 changed files with 6 additions and 4 deletions

View File

@@ -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:

View File

@@ -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