Python test by send / expect.
Project description
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
// EOF
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file testvdrive-1.2.0.tar.gz.
File metadata
- Download URL: testvdrive-1.2.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8fe1534ab18a26793c466acd4fcb12df7a5595d51d580cd14dd8550cd1138db
|
|
| MD5 |
4e61071dbb4270df7e36959737d67342
|
|
| BLAKE2b-256 |
a7c7b45829945ccf02838f190229be87e3dc8ecb7c7674d56b1ab3e99ec10430
|
File details
Details for the file testvdrive-1.2.0-py3-none-any.whl.
File metadata
- Download URL: testvdrive-1.2.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5528ea90bae0da272a0ac737bf300849047fa8a2284c504ffba80b64eb1f2555
|
|
| MD5 |
7b7d1d0021f83721cc7987abeb0c18d4
|
|
| BLAKE2b-256 |
7e0a3a00cc3d20761375f211ddd5a0f83b14c4d1ede6e6b0efd509539db1f91c
|