Registry / testing / texttest

texttest

JSON →
library4.4.6pypypi✓ verified 81d ago

TextTest is a tool for text-based Approval Testing, enabling developers to capture and compare output of command-line applications. Current version is 4.4.6, with a stable release cadence.

pip install texttest
INSTALL
IMPORT
SIG · TEXTTEST
T
texttest
testingpythonv4.4.6
Install
2.1s avg
Import
Disk
23MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.4.6 · 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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 24.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.1s · import 0.000s · 25MB
23MB installed
● package 23MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

main
from texttestlib import main
from texttest import TextTest
texttest_version
from texttestlib import texttest_version
from texttest import TextTest

Basic approval test that captures stdout and compares to previously approved output.

from texttest import TextTest import os test = TextTest( command='echo "Hello, World!"', name='hello_world', directory='/tmp/texttest_example', # For authentication or environment: use os.environ.get('KEY', '') ) test.run() assert test.passed print('Test passed!')
texttest --version
Debug
Known issues
breakingTextTest 4.x dropped support for Python < 3.9. If upgrading from older versions, ensure your environment uses Python 3.9+.
fix
Update Python to 3.9 or higher.
affects: >=4.0.0
gotchaThe `directory` parameter must be an absolute path. Relative paths can cause unexpected behavior or test failures.
fix
Always provide an absolute path (e.g., use `os.path.abspath`) for the `directory` argument.
affects: all
deprecatedThe `config_file` argument is deprecated in favor of passing configuration via the `config` dict parameter.
fix
Replace `config_file='path'` with `config={'key': 'value'}` in the TextTest constructor.
affects: >=4.3.0
Upgrade
Version history
4.4.6latest on PyPI · released Jan 26, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
20
Resources
texttest — pip install texttest · libregistry