Skip to main content

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 files for cmdtest 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmdtest 0.1.1
File Size Uploaded
cmdtest-0.1.1.tar.gz 2.1 kB Details

Release files / cmdtest-0.1.1.tar.gz

Download URL cmdtest-0.1.1.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7ba8ea75d2c5ba84608dbec41a597f7181ef5e4c4fb01351238dd64c41e43614
BLAKE2b-256 checksum
How to use checksums
abe2ab4391add273dde21aeb95398737c0a005265199b3aa5e50454e81e54a8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page