-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve test case and wrap code in function
- Loading branch information
Showing
2 changed files
with
9 additions
and
6 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,13 +1,13 @@ | ||
import pytest | ||
|
||
from neuralprophet.__main__ import parser | ||
from neuralprophet.__main__ import parse_args | ||
from neuralprophet._version import __version__ | ||
|
||
|
||
def test_main_file(capsys): | ||
with pytest.raises(SystemExit) as exit_info: | ||
parser.parse_args(["--version"]) | ||
parse_args(["--version"]) | ||
|
||
out, _ = capsys.readouterr() | ||
assert "<ExceptionInfo SystemExit(0) tblen=8>" == str(exit_info) | ||
assert exit_info.value.code == 0 | ||
assert __version__ in out |