Add snapshot test for hot reloading.

This commit is contained in:
Rodrigo Girão Serrão
2023-03-28 15:01:51 +01:00
parent 474d5bc784
commit e2a16b5696
4 changed files with 195 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
from pathlib import Path
from textual.app import App, ComposeResult
from textual.containers import Container
from textual.widgets import Label
CSS_PATH = (Path(__file__) / "../hot_reloading_app.css").resolve()
CSS_PATH.write_text(
"""
Container {
align: center middle;
}
Label {
border: round $primary;
padding: 3;
}
"""
)
class HotReloadingApp(App[None]):
CSS_PATH = CSS_PATH
def compose(self) -> ComposeResult:
yield Container(Label("Hello, world!"))