Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BerengerBerthoul committed Mar 27, 2024
1 parent 08d5cbf commit f5c6e59
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pytest_parallel/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ def parse_slurm_options(opt_str):
assert opt[0:len('--ntasks')] == '--ntasks', 'pytest_parallel SLURM scheduler: parsing error for `--ntasks`'
ntasks_val = opt[len('--ntasks'):]
assert ntasks_val[0]==' ' or ntasks_val[0]=='=', 'pytest_parallel SLURM scheduler: parsing error for `--ntasks`'
try:
ntasks = int(ntasks_val[1:])
except ValueError:
assert ntasks_val[0]==' ' or ntasks_val[0]=='=', 'pytest_parallel SLURM scheduler: parsing error for `--ntasks`'
ntasks = int(ntasks_val[1:])
return ntasks, opts

assert 0, 'pytest_parallel SLURM scheduler: you need specify `--ntasks` in `--slurm-options`'
Expand Down

0 comments on commit f5c6e59

Please sign in to comment.