Skip to content

Commit

Permalink
LIU-420: Set maxDiff to None
Browse files Browse the repository at this point in the history
  • Loading branch information
myxie committed Nov 25, 2024
1 parent 7de4581 commit 0de27c1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions daliuge-engine/test/deploy/test_slurm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,18 @@

class TestSlurmClient(unittest.TestCase):

def test_client_with_cli(self):
def setUp(self) -> None:
super().setUp()
self.maxDiff = None
# Use special graph that also contains file name. See 'create_dlg_job.py'
pg = files(test_graphs) / "SLURM_HelloWorld_simplePG.graph"
self.pg = files(test_graphs) / "SLURM_HelloWorld_simplePG.graph"

def test_client_with_cli(self):
client = SlurmClient(
facility="setonix",
num_nodes=6,
job_dur=45,
physical_graph_template_file=pg,
physical_graph_template_file=self.pg,
suffix="TestSession",
username="test"
)
Expand All @@ -67,14 +70,13 @@ def test_client_with_configfile(self):
- That we produce the same as the CLI with the same parameters
- That we can use the INI file to produce alternative parameters
"""
pg = files(test_graphs) / "SLURM_HelloWorld_simplePG.graph"
cfg_file = Path(__file__).parent / "setonix.ini"
cfg = process_config(cfg_file)
client = SlurmClient(
facility="setonix",
num_nodes=6,
job_dur=45,
physical_graph_template_file=str(pg),
physical_graph_template_file=self.pg,
suffix="TestSession",
config=cfg,
username='test'
Expand All @@ -95,13 +97,12 @@ def test_client_with_slurm_template(self):
Use 'slurm_script_from_template.sh as a comparison file to demonstrate
how the template approach gives us more options.
"""
pg = files(test_graphs) / "SLURM_HelloWorld_simplePG.graph"
template = Path(__file__).parent / "example_template.slurm"
with template.open() as fp:
slurm_template = fp.read()
client = SlurmClient(
facility="setonix",
physical_graph_template_file=str(pg),
physical_graph_template_file=self.pg,
suffix="TestSession",
slurm_template=slurm_template,
username='test'
Expand Down

0 comments on commit 0de27c1

Please sign in to comment.