From dcda1158f2922f6d028b10daba275a09b073fa41 Mon Sep 17 00:00:00 2001 From: servostar Date: Wed, 8 May 2024 13:55:40 +0200 Subject: [PATCH] added tmp folder handler --- tests/ast/test_ast.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/ast/test_ast.py b/tests/ast/test_ast.py index 8acd654..0f9b757 100644 --- a/tests/ast/test_ast.py +++ b/tests/ast/test_ast.py @@ -71,6 +71,19 @@ def run_check_print_node(): def run_check_print_graphviz(): info("started check print graphviz...") + info("creating temporary folder...") + + if not os.path.exists("tmp"): + os.mkdir("tmp") + + info("cleaning temporary folder...") + + if os.path.exists("tmp/graph.gv"): + os.remove("tmp/graph.gv") + + if os.path.exists("tmp/graph.svg"): + os.remove("tmp/graph.svg") + p = subprocess.run(BIN_DIR + "print_graphviz", capture_output=True, text=True) info("checking exit code...")