Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Blanca Fuentes Monjas committed Nov 19, 2024
1 parent 4844ac3 commit 42dc22a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions reframe/core/schedulers/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,11 +734,10 @@ def satisfies(self, slurm_constraint: str):
for grp in re.finditer(r'(\w(\w|\d)*)', slurm_constraint)}
slurm_constraint = slurm_constraint.replace(
"&", " and ").replace("|", " or ")
expr = " ".join([f"vars['{key}']" if key not in [
'and', 'or'
] else key
for key in slurm_constraint.split()])

# Pattern to extract the variable names
pattern = r'\b(?!and\b|or\b)(\d*[a-zA-Z_]\w*)\b'
# Replace each variable with var['variable']
expr = re.sub(pattern, r"vars['\1']", slurm_constraint)
vars = {n: True for n in self.active_features}
vars.update({n: False for n in names - self.active_features})
try:
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ archspec==0.2.5
argcomplete==3.1.2; python_version < '3.8'
argcomplete==3.5.1; python_version >= '3.8'
autopep8==2.0.4
autopep8==2.0.4
filelock==3.4.1; python_version == '3.6'
filelock==3.12.2; python_version == '3.7'
filelock==3.16.1; python_version >= '3.8'
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ install_requires =
archspec >= 0.2.4
argcomplete
argcomplete <= 3.1.2; python_version < '3.8'
autopep8
filelock
filelock<=3.12.2; python_version == '3.7'
filelock<=3.4.1; python_version == '3.6'
Expand Down

0 comments on commit 42dc22a

Please sign in to comment.