From f5c6e59d6cf0a26f2d3d3452efeb02180725c513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9renger=20Berthoul?= Date: Wed, 27 Mar 2024 23:22:44 +0100 Subject: [PATCH] Minor fix --- pytest_parallel/plugin.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pytest_parallel/plugin.py b/pytest_parallel/plugin.py index 9a90b13..e9a3a49 100644 --- a/pytest_parallel/plugin.py +++ b/pytest_parallel/plugin.py @@ -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`'