Skip to content

Commit

Permalink
black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fnattino committed Feb 9, 2024
1 parent 7f7c6e4 commit 73772e0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 26 deletions.
3 changes: 1 addition & 2 deletions dask_jobqueue/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,7 @@ def __init__(

# dask-worker command line build
dask_worker_command = "%(python)s -m %(worker_command)s" % dict(
python=python,
worker_command=worker_command
python=python, worker_command=worker_command
)

command_args = [dask_worker_command, self.scheduler]
Expand Down
12 changes: 6 additions & 6 deletions dask_jobqueue/tests/test_lsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ def test_job_script():
in job_script
)
formatted_bytes = format_bytes(parse_bytes("7GB")).replace(" ", "")
assert ("--nthreads 2" in job_script)
assert ("--nworkers 4" in job_script)
assert (f"--memory-limit {formatted_bytes}" in job_script)
assert "--nthreads 2" in job_script
assert "--nworkers 4" in job_script
assert f"--memory-limit {formatted_bytes}" in job_script

with LSFCluster(
queue="general",
Expand All @@ -123,9 +123,9 @@ def test_job_script():
in job_script
)
formatted_bytes = format_bytes(parse_bytes("7GB")).replace(" ", "")
assert ("--nthreads 2" in job_script)
assert ("--nworkers 4" in job_script)
assert (f"--memory-limit {formatted_bytes}" in job_script)
assert "--nthreads 2" in job_script
assert "--nworkers 4" in job_script
assert f"--memory-limit {formatted_bytes}" in job_script

with LSFCluster(
walltime="1:00",
Expand Down
12 changes: 6 additions & 6 deletions dask_jobqueue/tests/test_oar.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ def test_job_script():
in job_script
)
formatted_bytes = format_bytes(parse_bytes("7GB")).replace(" ", "")
assert ("--nthreads 2" in job_script)
assert ("--nworkers 4" in job_script)
assert (f"--memory-limit {formatted_bytes}" in job_script)
assert "--nthreads 2" in job_script
assert "--nworkers 4" in job_script
assert f"--memory-limit {formatted_bytes}" in job_script

with OARCluster(
walltime="00:02:00",
Expand Down Expand Up @@ -115,9 +115,9 @@ def test_job_script():
in job_script
)
formatted_bytes = format_bytes(parse_bytes("7GB")).replace(" ", "")
assert ("--nthreads 2" in job_script)
assert ("--nworkers 4" in job_script)
assert (f"--memory-limit {formatted_bytes}" in job_script)
assert "--nthreads 2" in job_script
assert "--nworkers 4" in job_script
assert f"--memory-limit {formatted_bytes}" in job_script


def test_config_name_oar_takes_custom_config():
Expand Down
12 changes: 6 additions & 6 deletions dask_jobqueue/tests/test_pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ def test_job_script(Cluster):
in job_script
)
formatted_bytes = format_bytes(parse_bytes("7GB")).replace(" ", "")
assert ("--nthreads 2" in job_script)
assert ("--nworkers 4" in job_script)
assert (f"--memory-limit {formatted_bytes}" in job_script)
assert "--nthreads 2" in job_script
assert "--nworkers 4" in job_script
assert f"--memory-limit {formatted_bytes}" in job_script

with Cluster(
queue="regular",
Expand All @@ -96,9 +96,9 @@ def test_job_script(Cluster):
in job_script
)
formatted_bytes = format_bytes(parse_bytes("7GB")).replace(" ", "")
assert ("--nthreads 2" in job_script)
assert ("--nworkers 4" in job_script)
assert (f"--memory-limit {formatted_bytes}" in job_script)
assert "--nthreads 2" in job_script
assert "--nworkers 4" in job_script
assert f"--memory-limit {formatted_bytes}" in job_script


@pytest.mark.env("pbs")
Expand Down
12 changes: 6 additions & 6 deletions dask_jobqueue/tests/test_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ def test_job_script():
in job_script
)
formatted_bytes = format_bytes(parse_bytes("7GB")).replace(" ", "")
assert ("--nthreads 2" in job_script)
assert ("--nworkers 4" in job_script)
assert (f"--memory-limit {formatted_bytes}" in job_script)
assert "--nthreads 2" in job_script
assert "--nworkers 4" in job_script
assert f"--memory-limit {formatted_bytes}" in job_script

with SLURMCluster(
walltime="00:02:00",
Expand Down Expand Up @@ -107,9 +107,9 @@ def test_job_script():
in job_script
)
formatted_bytes = format_bytes(parse_bytes("7GB")).replace(" ", "")
assert ("--nthreads 2" in job_script)
assert ("--nworkers 4" in job_script)
assert (f"--memory-limit {formatted_bytes}" in job_script)
assert "--nthreads 2" in job_script
assert "--nworkers 4" in job_script
assert f"--memory-limit {formatted_bytes}" in job_script


@pytest.mark.env("slurm")
Expand Down

0 comments on commit 73772e0

Please sign in to comment.