fix: close batch execution and recovery lifecycle
This commit is contained in:
1 parent
b19afc6a53
commit
d9cf6a07e9
91 files changed
+5779
-454
No files matched your search
@@ -20,6 +20,26 @@ def setup_store(tmp_path):
|
||||
return store, task, targets
|
||||
|
||||
|
||||
def test_unique_scoped_reference_ignores_stale_bom_uid(tmp_path):
|
||||
from dx_productivity.trial_task_center.bom_plan import BomMatcher, BomRecord
|
||||
from dx_productivity.trial_task_center.target_plan import TargetPlanRow
|
||||
target = ComponentTarget(tmp_path / 'board.prj', 'MAIN', '1', 'current', 'R1', 'OLD', '10nF')
|
||||
matcher = BomMatcher((TargetPlanRow(target),))
|
||||
record = BomRecord('', 'OLD', 'NEW', ('R1',), 'MAIN', '1', 'stale', True, '', True)
|
||||
matched = matcher.match_record(record)
|
||||
assert len(matched) == 1 and next(iter(matched.values())).target is target
|
||||
|
||||
|
||||
def test_uid_can_only_disambiguate_multiple_reference_candidates(tmp_path):
|
||||
from dx_productivity.trial_task_center.bom_plan import BomMatcher, BomRecord
|
||||
from dx_productivity.trial_task_center.target_plan import TargetPlanRow
|
||||
first = ComponentTarget(tmp_path / 'board.prj', 'MAIN', '1', 'u1', 'R1', 'OLD', '10nF')
|
||||
second = ComponentTarget(tmp_path / 'board.prj', 'MAIN', '2', 'u2', 'R1', 'OLD', '10nF')
|
||||
matcher = BomMatcher((TargetPlanRow(first), TargetPlanRow(second)))
|
||||
record = BomRecord('', 'OLD', 'NEW', ('R1',), '', '', 'u2', True, '', True)
|
||||
assert next(iter(matcher.match_record(record).values())).target is second
|
||||
|
||||
|
||||
def test_already_target_does_not_accept_duplicate_nc_from_leading_marker(tmp_path):
|
||||
from dx_productivity.trial_task_center.bom_plan import BomMatcher, BomRecord
|
||||
from dx_productivity.trial_task_center.target_plan import TargetPlanRow
|
||||
|
||||
Reference in new issue
Block a user