Skip to content

Commit

Permalink
added test for creatig experment
Browse files Browse the repository at this point in the history
  • Loading branch information
Terry McGuinness committed Jun 28, 2024
1 parent b86aa8c commit e99efcc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ci/scripts/tests/test_create_experiment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from wxflow import Executable
from shutil import rmtree
import os

_here = os.path.dirname(__file__)
HOMEgfs = os.sep.join(_here.split(os.sep)[:-3])
RUNDIR = os.path.join(_here, 'testdata/RUNDIR')
case = "C48_ATM"

def test_create_experiment():

env = os.environ.copy()
env['pslot'] = case
env['RUNTESTS'] = RUNDIR

create_experment_script = Executable('../../../workflow/create_experiment.py')
create_experment_script.add_default_arg(['-y', f'../../cases/pr/{case}.yaml', '--overwrite'])
create_experment_script(env=env)
assert (create_experment_script.returncode == 0)

rmtree(RUNDIR)

0 comments on commit e99efcc

Please sign in to comment.