fix: missing release tag "post"

This commit is contained in:
Manuel Barkhau 2019-02-22 09:12:09 +01:00
parent c2103a242f
commit 30657c7948
2 changed files with 9 additions and 2 deletions

View file

@ -170,7 +170,14 @@ def _is_calver(nfo: typ.Union[CalendarInfo, VersionInfo]) -> bool:
TAG_ALIASES: typ.Dict[str, str] = {'a': "alpha", 'b': "beta", 'pre': "rc"}
PEP440_TAGS: typ.Dict[str, str] = {'alpha': "a", 'beta': "b", 'final': "", 'rc': "rc", 'dev': "dev"}
PEP440_TAGS: typ.Dict[str, str] = {
'alpha': "a",
'beta' : "b",
'final': "",
'rc' : "rc",
'dev' : "dev",
'post' : "post",
}
VersionInfoKW = typ.Dict[str, typ.Union[str, int, None]]

View file

@ -43,7 +43,7 @@ def test_bump_random(monkeypatch):
for i in range(1000):
cur_date += dt.timedelta(days=int((1 + random.random()) ** 10))
new_version = version.incr(
cur_version, release=random.choice([None, "alpha", "beta", "rc", 'final'])
cur_version, release=random.choice([None, "alpha", "beta", "rc", "final", "post"])
)
assert cur_version < new_version
cur_version = new_version