diff --git a/salishsea_cmd/run.py b/salishsea_cmd/run.py index b69a50b..b9a47ba 100644 --- a/salishsea_cmd/run.py +++ b/salishsea_cmd/run.py @@ -750,9 +750,13 @@ def _sbatch_directives( """ run_id = get_run_desc_value(run_desc, ("run_id",)) nodes = math.ceil(n_processors / procs_per_node) - mem = {"beluga": "92G", "cedar": "0", "graham": "0", "narval": "0", "sockeye": "186gb"}.get( - SYSTEM, mem - ) + mem = { + "beluga": "92G", + "cedar": "0", + "graham": "0", + "narval": "0", + "sockeye": "186gb", + }.get(SYSTEM, mem) if deflate: run_id = f"{result_type}_{run_id}_deflate" try: diff --git a/tests/test_run.py b/tests/test_run.py index 019b95a..eb7774c 100644 --- a/tests/test_run.py +++ b/tests/test_run.py @@ -2296,9 +2296,7 @@ def test_graham(self, account, deflate, monkeypatch): ) assert script == expected - @pytest.mark.parametrize( - "deflate", [True, False] - ) + @pytest.mark.parametrize("deflate", [True, False]) def test_narval(self, deflate, monkeypatch): desc_file = StringIO( "run_id: foo\n" "walltime: 01:02:03\n" "email: me@example.com" @@ -2883,6 +2881,7 @@ def test_unknown_system(self, caplog, monkeypatch): assert caplog.records[0].levelname == "ERROR" assert caplog.records[0].message == "unknown system: mythical" + class TestSbatchDirectives: """Unit tests for _sbatch_directives() function.""" @@ -3091,7 +3090,9 @@ def test_sockeye_sbatch_directives(self, caplog, monkeypatch): ("sockeye", 40), ), ) - def test_account_directive_from_yaml(self, system, procs_per_node, caplog, monkeypatch): + def test_account_directive_from_yaml( + self, system, procs_per_node, caplog, monkeypatch + ): desc_file = StringIO( "run_id: foo\n" "walltime: 01:02:03\n" "account: def-sverdrup\n" )