forked from PrefectHQ/prefect
-
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.
Update
versioneer.py
to ignore uncommited changes (PrefectHQ#15672)
- Loading branch information
1 parent
17b5f7e
commit e1f8844
Showing
6 changed files
with
50 additions
and
9 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
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,45 @@ | ||
"""Tests custom changes to versioneer.py""" | ||
|
||
from versioneer import render_pep440 | ||
|
||
|
||
def test_render_pep440_ignores_dirty(): | ||
""" | ||
Tests that versioneer.py's render_pep440 ignores dirty. | ||
""" | ||
assert ( | ||
render_pep440( | ||
{ | ||
"long": "3452196e283815332768b084467cba17d6d40ffa", | ||
"short": "3452196e28", | ||
"error": None, | ||
"branch": "test", | ||
"dirty": True, | ||
"closest-tag": "0.0.1", | ||
"distance": 0, | ||
"date": "2024-10-12T23:30:05-0500", | ||
} | ||
) | ||
== "0.0.1" | ||
) | ||
|
||
|
||
def test_render_pep440_ignores_respects_distance(): | ||
""" | ||
Tests that versioneer.py's render_pep440 still respects distance. | ||
""" | ||
assert ( | ||
render_pep440( | ||
{ | ||
"long": "3452196e283815332768b084467cba17d6d40ffa", | ||
"short": "3452196e28", | ||
"error": None, | ||
"branch": "test", | ||
"dirty": False, | ||
"closest-tag": "0.0.1", | ||
"distance": 1, | ||
"date": "2024-10-12T23:30:05-0500", | ||
} | ||
) | ||
== "0.0.1+1.g3452196e28" | ||
) |
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