Skip to content

Commit

Permalink
Add test for suicide prereqs
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Oct 30, 2024
1 parent 368f4d2 commit f6a7d29
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/integration/test_remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,3 +340,34 @@ async def test_prereqs(
('1/a2', None),
('1/b', None),
}


async def test_suicide(flow, scheduler, run, reflog, complete):
"""Test that suicide prereqs are unset by `cylc remove`."""
schd: Scheduler = scheduler(
flow({
'scheduling': {
'graph': {
'R1': '''
a => b => c => d => x
a & c => !x
'''
},
},
}),
paused_start=False,
)
async with run(schd):
reflog_triggers: set = reflog(schd)
await complete(schd, '1/b')
await run_cmd(remove_tasks(schd, ['1/a'], [FLOW_ALL]))
await complete(schd)

assert reflog_triggers == {
('1/a', None),
('1/b', ('1/a',)),
('1/c', ('1/b',)),
('1/d', ('1/c',)),
# 1/x not suicided as 1/a was removed:
('1/x', ('1/d',)),
}

0 comments on commit f6a7d29

Please sign in to comment.