mirror of
https://github.com/infeeeee/dyn2py
synced 2025-12-16 22:16:18 +01:00
More tests
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import pathlib
|
||||
import dyn2py
|
||||
|
||||
INPUT_DIR = "tests/input_files"
|
||||
OUTPUT_DIR = "tests/output_files"
|
||||
@@ -10,3 +11,15 @@ def cleanup_output_dir():
|
||||
f.unlink()
|
||||
else:
|
||||
output_dir.mkdir()
|
||||
|
||||
|
||||
def extract_single_node_dyn():
|
||||
"""Extract python from single_node.dyn
|
||||
File will be here: f"{OUTPUT_DIR}/single_node_1c5d99792882409e97e132b3e9f814b0.py"
|
||||
"""
|
||||
cleanup_output_dir()
|
||||
|
||||
# Extract py:
|
||||
options = dyn2py.Options(python_folder=OUTPUT_DIR)
|
||||
dyn = dyn2py.DynamoFile(f"{INPUT_DIR}/single_node.dyn")
|
||||
dyn.extract_python(options)
|
||||
|
||||
Reference in New Issue
Block a user