Skip to content

Commit ca026ea

Browse files
Minor. Remove unused 'signal_info' in shell_static_scheduler/receive_items + cosmetics in slurm_scheduler/receive_items
1 parent 6680304 commit ca026ea

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

pytest_parallel/shell_static_scheduler.py

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,17 @@ def receive_items(items, session, socket, n_item_to_recv):
8585
with conn:
8686
msg = socket_recv(conn)
8787
test_info = pickle.loads(msg) # the worker is supposed to have send a dict with the correct structured information
88-
if 'signal_info' in test_info:
89-
print('signal_info= ',test_info['signal_info'])
90-
break
91-
else:
92-
test_idx = test_info['test_idx']
93-
if test_info['fatal_error'] is not None:
94-
assert 0, f'{test_info["fatal_error"]}'
95-
item = items[test_idx] # works because of precondition
96-
item.sub_comm = None
97-
item.info = test_info
98-
99-
# "run" the test (i.e. trigger PyTest pipeline but do not really run the code)
100-
nextitem = None # not known at this point
101-
run_item_test(item, nextitem, session)
102-
n_item_to_recv -= 1
88+
test_idx = test_info['test_idx']
89+
if test_info['fatal_error'] is not None:
90+
assert 0, f'{test_info["fatal_error"]}'
91+
item = items[test_idx] # works because of precondition
92+
item.sub_comm = None
93+
item.info = test_info
94+
95+
# "run" the test (i.e. trigger PyTest pipeline but do not really run the code)
96+
nextitem = None # not known at this point
97+
run_item_test(item, nextitem, session)
98+
n_item_to_recv -= 1
10399

104100
class ShellStaticScheduler:
105101
def __init__(self, main_invoke_params, ntasks, detach, use_srun):

pytest_parallel/slurm_scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def receive_items(items, session, socket, n_item_to_recv):
9797

9898
# "run" the test (i.e. trigger PyTest pipeline but do not really run the code)
9999
nextitem = None # not known at this point
100-
run_item_test(items[test_idx], nextitem, session)
100+
run_item_test(item, nextitem, session)
101101
n_item_to_recv -= 1
102102

103103
class SlurmScheduler:

0 commit comments

Comments
 (0)