Skip to content

Commit

Permalink
test for expyre job_name with special character
Browse files Browse the repository at this point in the history
  • Loading branch information
bernstei committed Feb 21, 2025
1 parent ec4899d commit 252f61c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 6 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ def do_init_mpipool():
wfl.autoparallelize.mpipool_support.init()


@pytest.mark.skipif(
"WFL_MPIPOOL" not in os.environ, reason="only init mpipool if WFL_MPIPOOL is in env"
)
@pytest.mark.mpi(minsize=2)
# marks on fixtures deprecated, let's hope that no one sets WFL_MPIPOOL
# when not using --with-mpi @pytest.mark.mpi(minsize=2)
@pytest.fixture(scope="session", autouse=True)
def init_mpipool(request):
"""initialize mpipool, only if running with mpirun
"""
do_init_mpipool()
if "WFL_MPIPOOL" in os.environ:
do_init_mpipool()
else:
sys.stderr.write("Skipping init_mpipool since WFL_MPIPOOL env var not defined")

# request.addfinalizer(finalizer_function)

Expand Down
4 changes: 3 additions & 1 deletion tests/test_remote_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ def do_vasp_fail(tmp_path, sys_name, monkeypatch, remoteinfo_env):


def do_generic_calc(tmp_path, sys_name, monkeypatch, remoteinfo_env):
ri = {'sys_name': sys_name, 'job_name': 'pytest_'+sys_name,
# use a job_name with a regexp-special character to test
# bug in https://github.com/libAtoms/workflow/issues/353
ri = {'sys_name': sys_name, 'job_name': 'pytest_' + sys_name + '+1',
'resources': {'max_time': '1h', 'num_nodes': 1},
'num_inputs_per_queued_job': -36, 'check_interval': 10}

Expand Down

0 comments on commit 252f61c

Please sign in to comment.