Last active
November 8, 2017 19:22
-
-
Save jbn/14ca7ad9f2c40216427151ac8993890d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################### | |
# setUp | |
############################################################################### | |
# Fail on first non-zero return value. | |
set -ev | |
# Ensure a pristine environment. | |
rm -rf cli_tests/outputs && mkdir cli_tests/outputs | |
############################################################################### | |
# 1. The first test. | |
############################################################################### | |
# Run the cli as __main__, with appending coverage. | |
# Capture the output as cli_tests/outputs/test_2.txt | |
(coverage run --source=pathsjson --append -m pathsjson.cli --shell-exports > \ | |
cli_tests/outputs/test_2.txt) || true | |
# Compare the captured output to the expected output. | |
diff cli_tests/outputs/test_2.txt cli_tests/test_2.expected.txt | |
############################################################################### | |
# tearDown | |
############################################################################### | |
rm -rf cli_tests/outputs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment