-
Notifications
You must be signed in to change notification settings - Fork 18
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 #1 from PMEAL/improve_tests
improve tests
- Loading branch information
Showing
1 changed file
with
15 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import porespy as ps | ||
import scipy as sp | ||
import git | ||
|
||
|
||
class PackageTest(): | ||
def setup_class(self): | ||
pass | ||
|
||
def test_version_number_and_git_tag_agree(self): | ||
repo = git.Repo(search_parent_directories=True) | ||
tag = repo.git.describe("--tags") | ||
tag = tag.strip('vV') # Remove 'v' or 'V' from tag if present | ||
tag = tag.split('-')[0] # Remove hash from tag number if present | ||
assert ps.__version__ == tag |