Registry /
testing / pytest-textual-snapshot
Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 43.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.8s · import 0.000s · 44MB
43MB installed
● package 43MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SnapshotAssertion
✓ from pytest_textual_snapshot import SnapshotAssertion
✗ from pytest_textual_snapshot import snapshot_app
SingleFileSnapshotExtension
✓ from pytest_textual_snapshot import SingleFileSnapshotExtension
SvgSnapshotDiff
✓ from pytest_textual_snapshot import SvgSnapshotDiff
Minimal test using the snapshot_app fixture to capture a Textual app's render.
import pytest
from textual.app import App, ComposeResult
from textual.widgets import Static
from pytest_textual_snapshot import snapshot_app
class SimpleApp(App):
def compose(self) -> ComposeResult:
yield Static("Hello, World!")
def test_snapshot(snapshot_app):
app = SimpleApp()
async with app.run_test() as pilot:
# Use snapshot_app fixture to capture the app's render
snapshot_app(app)
Upgrade
Version history
1.1.0latest on PyPI · released Jan 23, 2025
Audit
Dependencies
pytestrequiredPlugin requires pytest to run.
textualrequiredPlugin requires Textual framework to snapshot applications.