WIP: mostly scratch code still

This commit is contained in:
Manuel Barkhau 2018-09-02 21:48:12 +02:00
parent e2e218bce9
commit 3471560eaa
20 changed files with 1757 additions and 1 deletions

0
test/__init__.py Normal file
View file

0
test/test_config.py Normal file
View file

30
test/test_version.py Normal file
View file

@ -0,0 +1,30 @@
import datetime as dt
import pycalver.version
def test_calver():
import random
first_version_str = "v201808.0001-dev"
padding = len(first_version_str) + 3
version_str = first_version_str
def _current_calver() -> str:
_current_calver.delta += dt.timedelta(days=int(random.random() * 5))
return (dt.datetime.utcnow() + _current_calver.delta).strftime("v%Y%m")
_current_calver.delta = dt.timedelta(days=1)
global current_calver
current_calver = _current_calver
for i in range(1050):
version_str = incr_version(version_str, tag=random.choice([
None, "alpha", "beta", "rc"
]))
print(f"{version_str:<{padding}}", end=" ")
if (i + 1) % 8 == 0:
print()
print()