summaryrefslogtreecommitdiffstats
path: root/debian/tests/data/test-yaml.py
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests/data/test-yaml.py')
-rw-r--r--debian/tests/data/test-yaml.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/tests/data/test-yaml.py b/debian/tests/data/test-yaml.py
new file mode 100644
index 0000000..7a1bf9e
--- /dev/null
+++ b/debian/tests/data/test-yaml.py
@@ -0,0 +1,23 @@
+# very crude smoke test of the yaml package
+
+import ruamel.yaml as yaml
+
+
+def test_load_clib():
+ import ruamel.yaml.cyaml
+
+def test_safe_load():
+
+ with open("test-yaml.yaml") as fh:
+ y = yaml.safe_load(fh)
+
+ assert len(y['testdata']) == 2
+
+ assert len(y['testdata']['test1']) == 3
+
+ assert len(y['testdata']['test-data-2']) == 2
+
+
+if __name__ == "__main__":
+ test_safe_load()
+ print("Complete.")