mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 19:02:09 +00:00
python-awesomeversion: update to 25.8.0; add test.sh
Bump version 23.5.0 -> 25.8.0. Switch build dependency from python-poetry-core to python-hatchling. Add test.sh to verify version parsing, comparison, and strategy detection. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
committed by
Alexandru Ardelean
parent
c37fd13ffe
commit
a8e4f384fe
20
lang/python/python-awesomeversion/test.sh
Normal file
20
lang/python/python-awesomeversion/test.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$1" = python3-awesomeversion ] || exit 0
|
||||
|
||||
python3 - << 'EOF'
|
||||
from awesomeversion import AwesomeVersion, AwesomeVersionStrategy
|
||||
|
||||
v = AwesomeVersion("1.2.3")
|
||||
assert v.major == 1
|
||||
assert v.minor == 2
|
||||
assert v.patch == 3
|
||||
|
||||
v2 = AwesomeVersion("2.0.0")
|
||||
assert v2 > v
|
||||
|
||||
sem = AwesomeVersion("1.0.0")
|
||||
assert sem.strategy == AwesomeVersionStrategy.SEMVER
|
||||
|
||||
print("python3-awesomeversion OK")
|
||||
EOF
|
||||
Reference in New Issue
Block a user