Skip to content

Commit

Permalink
remove scope=session from maximalist_qresources
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumChemist authored and gpetretto committed Nov 15, 2024
1 parent 0f5a5e5 commit 3c54185
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def test_utils():
return TestUtils


@pytest.fixture(scope="session")
@pytest.fixture() # scope="session")
def maximalist_qresources():
"""A set of QResources options that try to make use of most features"""
from qtoolkit.core.data_objects import QResources
Expand Down
13 changes: 8 additions & 5 deletions tests/io/test_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,11 @@ def test_submission_script(self, slurm_io, maximalist_qresources):
script_qresources = slurm_io.get_submission_script(
commands=["ls -l"], options=maximalist_qresources
)
assert script_qresources.split(
"\n"
) == "#!/bin/bash\n\n#SBATCH --partition=test_queue\n#SBATCH --job-name=test_job\n#SBATCH --nodes=1\n#SBATCH --ntasks=1\n#SBATCH --ntasks-per-node=1\n#SBATCH --cpus-per-task=1\n#SBATCH --mem-per-cpu=1000\n#SBATCH --time=0-0:1:40\n#SBATCH --account=test_account\n#SBATCH [email protected]\n#SBATCH --mail-type=ALL\n#SBATCH --gres=gpu:1\n#SBATCH --output=test_output_filepath\n#SBATCH --error=test_error_filepath\n#SBATCH --qos=test_qos\n#SBATCH --priority=1\nls -l".split(
"\n"
)
assert script_qresources.split("\n") == (
"#!/bin/bash\n\n#SBATCH --partition=test_queue\n#SBATCH --job-name=test_job\n#SBATCH --nodes=1\n#SBATCH "
"--ntasks=1\n#SBATCH --ntasks-per-node=1\n#SBATCH --cpus-per-task=1\n#SBATCH "
"--mem-per-cpu=1000\n#SBATCH --time=0-0:1:40\n#SBATCH --account=test_account\n#SBATCH "
"[email protected]\n#SBATCH --mail-type=ALL\n#SBATCH --gres=gpu:1\n#SBATCH "
"--output=test_output_filepath\n#SBATCH --error=test_error_filepath\n#SBATCH --qos=test_qos\n#SBATCH "
"--priority=1\nls -l"
).split("\n")

0 comments on commit 3c54185

Please sign in to comment.