From d29e862afe407b7f3360d7b14f34ca179abdcd1d Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sun, 9 Aug 2026 12:40:50 +0300 Subject: [PATCH] python-uvicorn: add test script Add a CI test.sh exercising basic package functionality. Signed-off-by: Alexandru Ardelean --- lang/python/python-uvicorn/test.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 lang/python/python-uvicorn/test.sh diff --git a/lang/python/python-uvicorn/test.sh b/lang/python/python-uvicorn/test.sh new file mode 100755 index 0000000000..0b02336baa --- /dev/null +++ b/lang/python/python-uvicorn/test.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +[ "$1" = python3-uvicorn ] || exit 0 + +python3 - << 'EOF' + +import uvicorn + +# Config.load() imports and wires the HTTP/WS protocol backends (h11, etc.) +# for a trivial ASGI app - a real functional check that never binds a port. +async def app(scope, receive, send): + pass + +cfg = uvicorn.Config(app, host="127.0.0.1", port=8000, log_level="warning", loop="asyncio") +cfg.load() +assert cfg.loaded is True +assert uvicorn.Server(cfg).config is cfg + +EOF