]> granicus.if.org Git - graphviz/commitdiff
Add test_shapes.py
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 19 Apr 2020 16:44:27 +0000 (18:44 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 22 Apr 2020 04:33:41 +0000 (06:33 +0200)
tests/regression_tests/shapes/Makefile.am
tests/regression_tests/shapes/test_shapes.py [new file with mode: 0644]

index 64aaa8f10ac9813c00ca1d0f7ece1e9773a8700b..46a0c36c784c6806bc48257f4b71f5f6955e91b6 100644 (file)
@@ -5,4 +5,5 @@ check test rtest:
 
 EXTRA_DIST = \
        shapes.sh \
+       test_shapes.py \
        shapes.py
diff --git a/tests/regression_tests/shapes/test_shapes.py b/tests/regression_tests/shapes/test_shapes.py
new file mode 100644 (file)
index 0000000..33e1fe6
--- /dev/null
@@ -0,0 +1,11 @@
+import subprocess
+import os
+import sys
+
+def test_shapes():
+    python_version = sys.version_info[0]
+    os.chdir(os.path.dirname(os.path.realpath(__file__)))
+    result = subprocess.Popen(['python' + str(python_version), './shapes.py'])
+    text = result.communicate()[0]
+    print(text)
+    assert result.returncode == 0