]> git.99rst.org Git - openwrt-packages.git/commitdiff
python-pika: add test script
authorAlexandru Ardelean <redacted>
Sun, 9 Aug 2026 09:40:50 +0000 (12:40 +0300)
committerAlexandru Ardelean <redacted>
Tue, 11 Aug 2026 10:45:20 +0000 (13:45 +0300)
Add a CI test.sh exercising basic package functionality.

Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python-pika/test.sh [new file with mode: 0755]

diff --git a/lang/python/python-pika/test.sh b/lang/python/python-pika/test.sh
new file mode 100755 (executable)
index 0000000..b28d30d
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+[ "$1" = python3-pika ] || exit 0
+
+python3 - << 'EOF'
+
+import pika
+
+# No broker required: parse an AMQP URL and build message properties, which
+# exercises the URL parameter parser and the pika.spec frame classes.
+p = pika.URLParameters("amqp://user:pass@host:5672/vhost")
+assert p.host == "host" and p.port == 5672
+assert p.credentials.username == "user"
+
+props = pika.BasicProperties(content_type="text/plain", delivery_mode=2)
+assert props.content_type == "text/plain" and props.delivery_mode == 2
+
+EOF
git clone https://git.99rst.org/PROJECT