-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #428 from amperser/exit-codes
Use exit codes
- Loading branch information
Showing
4 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"""Proselint version number.""" | ||
|
||
__version__ = "0.4.4" | ||
__version__ = "0.5.0" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.4.4 | ||
current_version = 0.5.0 | ||
commit = True | ||
tag = True | ||
tag_name = {new_version} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Check that the CLI returns the appropriate exit code.""" | ||
|
||
import subprocess | ||
|
||
|
||
def test_exit_code_demo(): | ||
"""Ensure that linting the demo returns an exit code of 1.""" | ||
try: | ||
subprocess.check_output("proselint --demo", shell=True) | ||
|
||
except subprocess.CalledProcessError as grepexc: | ||
assert(grepexc.returncode == 1) | ||
|
||
|
||
def test_exit_code_version(): | ||
"""Ensure that getting the version returns an exit code of 0.""" | ||
try: | ||
subprocess.check_output("proselint --version", shell=True) | ||
|
||
except subprocess.CalledProcessError: | ||
assert(False) |