Skip to main content

YAML-based tests for command-line utilities

Project description

# ``climactic``

*Testing command-line utilities*


## Install

Most simply:

pip install climactic


## Usage

Create a test file, for example, ``test_git_init.yml``:

---
# Run `git init` and verify that
# the expected directory structure
# and file contents are produced.

# Sets environment vars
- env:
CMD: git

# Runs `git init`
- run: |
${CMD} init

# Verifies the dir tree and files
# were created
- assert-tree:
- .git:
- HEAD
- objects:
- refs:
- heads:
- tags:

# Verifies that the file .git/HEAD
# was populated with the ref string
# for the initial master branch
- assert-file-utf8:
- .git/HEAD: |
refs/heads/master

``cd`` to a directory containing this file and run:

~/climactic/examples$ climactic
.
----------------------------------------------------------------------
Ran 1 test in 0.029s

OK


## License

Copyright (C) 2015 Brian Jorgensen

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.


## Author

[Brian Jorgensen](brian.jorgensen+climactic@gmail.com)

*Don't Take Any Wooden Nickels*

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

climactic-0.1.1.tar.gz (5.8 kB view hashes)

Uploaded Source

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