diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-17 19:43:33 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-17 19:43:33 +0000 |
| commit | 1e786784520b5e39f60d132df3314fbef85500eb (patch) | |
| tree | 30345be62c1b55b0222e63fa599c6aacbdd1b797 | |
| parent | b2bf358959986719484ef623017af52b49c2b94a (diff) | |
Add basic test for CLI
| -rw-r--r-- | test-requirements.txt | 1 | ||||
| -rw-r--r-- | tests/cli_tests.py | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test-requirements.txt b/test-requirements.txt index 9258187..ff67a4e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,2 +1,3 @@ nose>=1.2.1,<2.0 funk>=0.3.1,<0.4 +spur.local>=0.3.7,<0.4 diff --git a/tests/cli_tests.py b/tests/cli_tests.py new file mode 100644 index 0000000..833cb33 --- /dev/null +++ b/tests/cli_tests.py @@ -0,0 +1,15 @@ +from nose.tools import istest, assert_equal + +import spur + +from .testing import test_path + + +_local = spur.LocalShell() + +@istest +def html_is_printed_to_stdout_if_output_file_is_not_set(): + docx_path = test_path("single-paragraph.docx") + result = _local.run(["mammoth", docx_path]) + assert_equal("", result.stderr_output) + assert_equal("<p>Walking on imported air</p>", result.output) |
