generated from ApeWorX/project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ModuleNotFound on run cmd (#169)
* fix: ModuleNotFound on run cmd * test: rename test
- Loading branch information
Showing
2 changed files
with
21 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,7 +1,19 @@ | ||
def test_run_no_bots(cli, runner): | ||
result = runner.invoke(cli, "run") | ||
assert result.exit_code != 0 | ||
expected = ( | ||
"Usage: cli run [OPTIONS] [BOT]\n" | ||
"Try 'cli run --help' for help.\n\n" | ||
"Error: Invalid value for '[BOT]': " | ||
"Nothing to run: No bot argument(s) given and no bots module found.\n" | ||
) | ||
assert result.output == expected | ||
|
||
|
||
def test_run_verbosity(cli, runner): | ||
""" | ||
A test showing the verbosity option works. | ||
If it didn't work, the exit code would not be 0 here. | ||
""" | ||
result = runner.invoke(cli, ["run", "--help", "--verbosity", "DEBUG"]) | ||
result = runner.invoke(cli, ["run", "--help", "--verbosity", "DEBUG"], catch_exceptions=False) | ||
assert result.exit_code == 0 |