From 9e0c990713e7d537101b64dc49f1dda6203248c8 Mon Sep 17 00:00:00 2001 From: Romain-Gauthier Date: Wed, 12 Jun 2024 11:01:12 +0200 Subject: [PATCH] clean test_get_option_settings --- ceasiompy/PyAVL/avlrun.py | 6 +++--- ceasiompy/PyAVL/tests/test_avlconfig.py | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ceasiompy/PyAVL/avlrun.py b/ceasiompy/PyAVL/avlrun.py index 7466b1c4f..79477a344 100644 --- a/ceasiompy/PyAVL/avlrun.py +++ b/ceasiompy/PyAVL/avlrun.py @@ -98,9 +98,9 @@ def run_avl(cpacs_path, wkdir): ) subprocess.run(["xvfb-run", "avl"], stdin=open(str(command_path), "r"), cwd=case_dir_path) - if save_fig: - subprocess.run(["ps2pdf", "plot.ps", "plot.pdf"], cwd=case_dir_path) - subprocess.run(["rm", "plot.ps"], cwd=case_dir_path) + # if save_fig: + # subprocess.run(["ps2pdf", "plot.ps", "plot.pdf"], cwd=case_dir_path) + # subprocess.run(["rm", "plot.ps"], cwd=case_dir_path) # ================================================================================================= diff --git a/ceasiompy/PyAVL/tests/test_avlconfig.py b/ceasiompy/PyAVL/tests/test_avlconfig.py index 6592b0802..e7583ad18 100644 --- a/ceasiompy/PyAVL/tests/test_avlconfig.py +++ b/ceasiompy/PyAVL/tests/test_avlconfig.py @@ -113,8 +113,12 @@ def test_delete_directory(): def test_get_option_settings(): - save_plots, vortex_distribution, Nchordwise, Nspanwise, integrate_fuselage = get_option_settings( - CPACS_IN_PATH) + (save_plots, + vortex_distribution, + Nchordwise, + Nspanwise, + integrate_fuselage) = get_option_settings(CPACS_IN_PATH) + assert save_plots, "Option 'save_plots' should be 'True'." assert vortex_distribution == 3.0, "Option 'vortex_distribution' should be '3.0'." assert Nchordwise == 5, "Option 'Nchordwise' should be '5'."