summaryrefslogtreecommitdiff
path: root/lang/python/python-jsonschema-specifications/test.sh
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2023-10-14 02:30:53 +0800
committerTianling Shen <cnsztl@gmail.com>2023-11-30 12:57:27 +0800
commitebb69c5c17fad8a7378a68c3206f1636465a77b9 (patch)
treef0a924989a7ecf9441d66e6949bf662b090d73b9 /lang/python/python-jsonschema-specifications/test.sh
parent728aac31bb205bab208142d116b1c1d3e0f62a14 (diff)
python-jsonschema-specifications: Add new package
From the README: JSON support files from the JSON Schema Specifications (metaschemas, vocabularies, etc.), packaged for runtime access from Python as a referencing-based Schema Registry. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'lang/python/python-jsonschema-specifications/test.sh')
-rw-r--r--lang/python/python-jsonschema-specifications/test.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/lang/python/python-jsonschema-specifications/test.sh b/lang/python/python-jsonschema-specifications/test.sh
new file mode 100644
index 000000000..cdf2f5710
--- /dev/null
+++ b/lang/python/python-jsonschema-specifications/test.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+[ "$1" = python3-jsonschema-specifications ] || exit 0
+
+python3 - << 'EOF'
+
+from jsonschema_specifications import REGISTRY as SPECIFICATIONS
+
+DRAFT202012_DIALECT_URI = "https://json-schema.org/draft/2020-12/schema"
+assert SPECIFICATIONS.contents(DRAFT202012_DIALECT_URI) != ""
+
+EOF