mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
WIP: mostly scratch code still
This commit is contained in:
parent
e2e218bce9
commit
3471560eaa
20 changed files with 1757 additions and 1 deletions
0
test/__init__.py
Normal file
0
test/__init__.py
Normal file
0
test/test_config.py
Normal file
0
test/test_config.py
Normal file
30
test/test_version.py
Normal file
30
test/test_version.py
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue