Skip to main content

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.

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

cmdtest-0.1.1.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file cmdtest-0.1.1.tar.gz.

File metadata

  • Download URL: cmdtest-0.1.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cmdtest-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7ba8ea75d2c5ba84608dbec41a597f7181ef5e4c4fb01351238dd64c41e43614
MD5 4d693de8b75e6c50ebd310165de271ef
BLAKE2b-256 abe2ab4391add273dde21aeb95398737c0a005265199b3aa5e50454e81e54a8a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page