Skip to content

Commit

Permalink
Improve assertion precision if it fails
Browse files Browse the repository at this point in the history
  • Loading branch information
LourensVeen committed Nov 30, 2024
1 parent 21e68b4 commit 8e5e7eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions integration_test/cluster_test/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,14 @@ def test_multiple(
assert sched.get_exit_code(job_id) == 0

for i in range(1, 7):
out = _get_stdout(remote_out_dir, 'multiple', mode, f'c{i}')
instance = f'c{i}'
out = _get_stdout(remote_out_dir, 'multiple', mode, instance)
if mode == 'local':
assert out.split('\n')[0] == 'headnode'
else:
node, hwthreads, _ = out.split('\n')
assert node == f'node-{(i - 1) // 2}'
assert hwthread_to_core(hwthreads) == [(i - 1) % 2]
assert (instance, node) == (instance, f'node-{(i - 1) // 2}')
assert (instance, hwthread_to_core(hwthreads)) == (instance, [(i - 1) % 2])


@skip_unless_cluster
Expand Down

0 comments on commit 8e5e7eb

Please sign in to comment.