Python test drive utility
A nifty utility to test things.
The test case file drives a send / expect engine. The expect is then evaluated and the result is printed in a green colored 'OK' or a red colored 'ERR'.
./testvdrive.py testcase.txt
If you installed from pip, use:
testvdrive testcase.txt
The test case file contains the test instructions, one line per test. The format:
# Context_string Send_string Expect_string Find/Compare
# -------------- ----------- ------------- ------------
# for the user what to test what to expect True if Find
Example test cases:
[ "Echo Command", "", "", True], # NOOP
[ "Test ls", "ls", "Make", True], # Do we have a Make file
[ "DF command", "df", "blocks", "regex" ], # Search regex
[ "DF mregex", "df", ".*blo", "mregex" ], # Match regex
The output of example test cases (colored in terminal):
Echo Command OK
Test ls OK
DF command OK
DF mregex OK
Help from command line:
usage: testvdrive [-h] [-V] [-o] [-A] [-v] [-d DEBUGLEV] [-l FILL] [-s]
[test_cases ...]
Test with send/expect by executing sub commands from test case scripts.
positional arguments:
test_cases Test case file names to execute
options:
-h, --help show this help message and exit
-V, --version Show version number
-o, --outp Show communication with program
-A, --info Show testcase file format info
-v, --verbose increase verbocity (Default: none)
-d DEBUGLEV, --debug DEBUGLEV
Debug value (0-9). Show working info. Default: 0
-l FILL, --fill FILL Fill info string to lenght. Default: 16
-s, --show_case Show test case file(s).
For info on TestCase File Format use -A option. The file 'testcase.txt' is
executed by default.
Git
The source can be found on:
https://github.com/pglen/testvdrive
History:
Mon 22.Sep.2025 converted to text interaction from popen2
Wed 24.Sep.2025 return code now on pip install as well
// EOF
Metadata
Release files for testvdrive 1.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| testvdrive-1.3.2.tar.gz | 5.7 kB | Without provenance | Details for testvdrive-1.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| testvdrive-1.3.2-py3-none-any.whl | Python 3 | none | any | Details for testvdrive-1.3.2-py3-none-any.whl |
Total release size: 11.3 kB
Release files / testvdrive-1.3.2.tar.gz
| Download URL | testvdrive-1.3.2.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
feb0712ec33867406f37f9cc0051cc35544175ec3a79f7a2b2489d5ef6fe810d
|
|
BLAKE2b-256 checksum How to use checksums |
10c76026de868e75c487c3310784b9f8a887259adf09c825e1119f52505062d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / testvdrive-1.3.2-py3-none-any.whl
| Download URL | testvdrive-1.3.2-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab3c76fdf7fb398f9c0375ec03a4a395fa1225a9b1d9bd90de57b8062694c705
|
|
BLAKE2b-256 checksum How to use checksums |
6e444f57882da7cad47d0c1e793b65195d343d164a25be7d63958883ea007f01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for testvdrive 1.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.