]> git.99rst.org Git - openwrt-packages.git/commitdiff
python-asgiref: improve version check in test.sh
authorWei-Ting Yang <redacted>
Fri, 10 Jul 2026 06:51:45 +0000 (14:51 +0800)
committerAlexandru Ardelean <redacted>
Wed, 15 Jul 2026 07:22:17 +0000 (10:22 +0300)
Verify that asgiref.__version__ strictly equals the expected version
argument ($2), instead of just checking that it is non-empty.

Also remove single quotes from EOF to enable variable expansion.

Signed-off-by: Wei-Ting Yang <redacted>
lang/python/python-asgiref/test.sh

index 9c436420d48dd132c137f3779ca75d6af61e5251..f1866bc6cb109f70089ba462f170da012774da45 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 [ "$1" = python3-asgiref ] || exit 0
-python3 - << 'EOF'
+python3 - << EOF
 import asgiref
-assert asgiref.__version__, "asgiref version is empty"
+assert asgiref.__version__ == "$2", "Incorrect asgiref version"
 
 from asgiref.sync import async_to_sync, sync_to_async
 import asyncio
git clone https://git.99rst.org/PROJECT