A library for testing command-line scripts (CLI applications) in Python. It provides a TestEnvironment that captures stdout, stderr, and simulates stdin. Current version 2.0.post1. Release cadence is low; no new releases for several years.
pip install scripttestVerified import paths — ran on the pinned version, not inferred.
Basic usage: create a TestEnvironment, then run a command using env.run(). Check stdout, stderr, and returncode.
Access attributes: result.stdout, result.stderr, result.returncode instead of unpacking.
Use 'from scripttest import TestEnvironment'.
Use env.set_cwd('/path') or pass cwd to run().No dependency data recorded yet.