This repository has been archived by the owner on Mar 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
14 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,8 +1,19 @@ | ||
from supernova import supernova | ||
import pkg_resources | ||
from click.testing import CliRunner | ||
from supernova import executable, supernova | ||
|
||
|
||
class TestSuperNova(object): | ||
|
||
def test_init(self): | ||
obj = supernova.SuperNova() | ||
assert obj is not None | ||
|
||
def test_version_output(self): | ||
# Get the current version number using setuptools | ||
version = pkg_resources.require("supernova")[0].version | ||
|
||
runner = CliRunner() | ||
result = runner.invoke(executable.run_supernova, ['--version']) | ||
assert result.exit_code == 0 | ||
assert result.output == "supernova, version {0}\n".format(version) |