mirror of
https://github.com/openwrt/packages.git
synced 2025-12-22 03:54:34 +04:00
python-jsonschema: Update to 4.19.1, update list of dependencies
This also adds a test.sh script for the packages feed CI. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
committed by
Tianling Shen
parent
ebb69c5c17
commit
36eb48465b
21
lang/python/python-jsonschema/test.sh
Normal file
21
lang/python/python-jsonschema/test.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$1" = python3-jsonschema ] || exit 0
|
||||
|
||||
python3 - << 'EOF'
|
||||
|
||||
from jsonschema import validate
|
||||
|
||||
# A sample schema, like what we'd get from json.load()
|
||||
schema = {
|
||||
"type" : "object",
|
||||
"properties" : {
|
||||
"price" : {"type" : "number"},
|
||||
"name" : {"type" : "string"},
|
||||
},
|
||||
}
|
||||
|
||||
# If no exception is raised by validate(), the instance is valid.
|
||||
validate(instance={"name" : "Eggs", "price" : 34.99}, schema=schema)
|
||||
|
||||
EOF
|
||||
Reference in New Issue
Block a user