Skip to content

Commit

Permalink
clean test_get_option_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Romain-Gauthier committed Jun 12, 2024
1 parent 2a8a2d5 commit 9e0c990
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ceasiompy/PyAVL/avlrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


# =================================================================================================
Expand Down
8 changes: 6 additions & 2 deletions ceasiompy/PyAVL/tests/test_avlconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'."
Expand Down

0 comments on commit 9e0c990

Please sign in to comment.