Simple testing for command line programs.
Project Description
cmdtest is a simple way to test command line programs.
from cmdtest import Program, File cat = Program('cat') @cat.test def cat_should_echo_single_file(): assert cat(File('hello')).out == 'hello' @cat.test def cat_should_combine_files(): assert cat(File('hello'), File('world')).out == 'helloworld' if __name__ == '__main__': cat.run()
Installation
Available from PyPI with either pip or easy_install:
$ pip install cmdtest $ easy_install cmdtest
This will also pull in the Attest dependencies.
Release history Release notifications
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size & hash SHA256 hash help | File type | Python version | Upload date |
---|---|---|---|
cmdtest-0.1.1.tar.gz (2.1 kB) Copy SHA256 hash SHA256 | Source | None | May 13, 2013 |