-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented the versioning information in terms of
__version__
;
- Loading branch information
1 parent
9a68bac
commit a162b31
Showing
4 changed files
with
33 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
__version__ = "0.2.0" | ||
__version_tuple__ = (0, 2, 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
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,23 @@ | ||
import scrivid | ||
|
||
import importlib.metadata | ||
|
||
import pytest | ||
|
||
|
||
def convert_package_version_to_tuple(package_version): | ||
return tuple(int(element) for element in package_version.split(".")) | ||
|
||
|
||
@pytest.fixture | ||
def package_version(): | ||
yield importlib.metadata.version("scrivid") | ||
|
||
|
||
def test_package_version(package_version): | ||
assert scrivid.__version__ == package_version | ||
|
||
|
||
def test_package_version_tuple(package_version): | ||
package_version = convert_package_version_to_tuple(package_version) | ||
assert scrivid.__version_tuple__ == package_version |