Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

iotest is a small tool for testing programs based on input and output.

Project Description

writeup v0 Dedicated to the public domain under CC0:

# iotest

iotest is a small tool for testing command line programs. By default it writes the stdout and stderr of the program under test to files, and then compares them to expected results using git diff. Here are some reasons I like it: - Specify complicated, multiline text expectations without fiddling with escape characters in test code. - Clearly differentiate between stdout and stderr, with default success/failure status code expectations. - Test output is placed sensibly in the _build directory for easy inspection. - Simple test case prototyping reduces test case redundancy without complicated inheritence overrides (conflicts result in an error).

iotest is available via pip for easy distribution. Alternatively, the script can be freely copied into a project; there is a single python dependency (pithy utility library), also available through pip.

# License

iotest dedicated to the public domain. It is written and maintained by George King.

# Usage

To run all tests in the test directory: $ iotest test/

iotest will look for test cases, which are indicated by the presence of a .iot, .out, or .err file. The filename stem (the part before dot/extension) indicates the name of the test case. This is then used to find a test executable with the matching stem. For example, if we have a test case file thing.iot and corresponding executable file, iotest will run and compare its output to the expectations specified in thing.iot. If there is more than one test case file, e.g. thing.iot and thing.err, then they will be combined together as long as they do not conflict (in other words, thing.iot cannot also specify a stderr expectation).

# Issues

Please file issues to the github repository:

Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
iotest-0.1.tar.gz (13.8 kB) Copy SHA256 Checksum SHA256 Source Feb 17, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting