diff --git a/README.md b/README.md index b4c7f9d..e489543 100644 --- a/README.md +++ b/README.md @@ -3,5 +3,12 @@ This is a little TUI based on [Textual] for entering new Teilchen and for searching for existing Teilchen. +Data will eventuall be stored in a SQLite database. + +## Running tests + +```sh +uv run pytest tests.py +``` [Textual]: https://textual.textualize.io/ diff --git a/__snapshots__/tests/test_initial_layout.raw b/__snapshots__/tests/test_initial_layout.raw new file mode 100644 index 0000000..c498016 --- /dev/null +++ b/__snapshots__/tests/test_initial_layout.raw @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SammlerApp + + + + + + + + + + SammlerApp +▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ +Enter Teilchen information: name, description, #tags Add  Search  +▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ + pk  Name   Description   Number  Tags                  + 0   Name0  Description0  9000    #tag0 #tag00 #tag000  + 1   Name1  Description1  9001    #tag1 #tag11 #tag111  + 2   Name2  Description2  9002    #tag2 #tag22 #tag222  + 3   Name3  Description3  9003    #tag3 #tag33 #tag333  + 4   Name4  Description4  9004    #tag4 #tag44 #tag444  + 5   Name5  Description5  9005    #tag5 #tag55 #tag555  + + + + + + + + + + + + + + + + + + + + + + + + + + +▆▆ + +^p palette + + + diff --git a/pyproject.toml b/pyproject.toml index b8e9dea..9184ada 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,3 +53,5 @@ dev = [ "pytest-asyncio>=1.3.0", "pytest-textual-snapshot>=1.0.0", ] +[tool.pytest] +asyncio_mode = "auto" diff --git a/tests.py b/tests.py new file mode 100644 index 0000000..0f6ea94 --- /dev/null +++ b/tests.py @@ -0,0 +1,2 @@ +def test_initial_layout(snap_compare): # pyright: ignore[reportMissingParameterType, reportUnknownParameterType] + assert snap_compare("src/teilchensammler_cli/main.py", terminal_size=(130, 40))