Kill the mutants of the move by a transition, and sort the new files' imports
CI / tests (pull_request) Successful in 3m0s

This commit is contained in:
2026-11-21 00:08:45 +01:00
parent 0e3b0811fb
commit e8cd651bb8
3 changed files with 9 additions and 5 deletions
+4
View File
@@ -421,6 +421,8 @@ class Jira(Case):
store = self.new_store()
key = store.file("ABC-12", "Count the runs.", "", ())
self.assertEqual(store.move_issue_by(key, "Release Ready"), Failure(f"{key} has no transition 'Release Ready' from its status, only 'Mark as done' to 'Done'"))
self.jira.workflow.append({"id": "11", "name": "Start", "to": {"name": "In Progress", "statusCategory": {"key": "indeterminate"}}})
self.assertEqual(store.move_issue_by(key, "Release Ready"), Failure(f"{key} has no transition 'Release Ready' from its status, only 'Mark as done' to 'Done' and 'Start' to 'In Progress'"))
self.jira.workflow = []
self.assertEqual(store.move_issue_by(key, "Release Ready"), Failure(f"{key} has no transition 'Release Ready' from its status, nor any other the account may make"))
self.assertEqual(self.jira.transitioned, [])
@@ -437,6 +439,8 @@ class Jira(Case):
self.assertEqual(store.move_issue_by(key, "Mark as done"), Failure(f"cannot read {key}'s transitions: Jira answered 503"))
self.jira.answers = {("GET", transitions): {"transitions": [{"id": "31"}]}}
self.assertEqual(store.move_issue_by(key, "Mark as done"), Failure(f"Jira answered {key}'s transitions in a shape other than the one it documents"))
self.jira.answers = {("GET", f"{ISSUES}/{key}?fields=parent,status"): Failure("Jira answered 503")}
self.assertEqual(store.move_issue_by(key, "Mark as done"), Failure(f"cannot read {key} to move it: Jira answered 503"))
def test_a_move_the_workflow_does_not_offer_fails_naming_what_it_offers(self) -> None:
store = self.new_store()
+2 -2
View File
@@ -2,9 +2,9 @@
import dataclasses
from do_epic.backend.protocol import EpicIssue, EpicStore
from do_epic.scheduler import unblocks
from do_epic.split import SPLIT_LABEL
from failure import Failure
from do_epic.split import SPLIT_LABEL
from do_epic.scheduler import unblocks
def moved(store: EpicStore, issues: list[EpicIssue], unblocking: tuple[str, ...], landed_by: str | None, finishes: bool) -> tuple[list[EpicIssue], list[str]]:
+3 -3
View File
@@ -5,11 +5,11 @@ import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from do_epic.backend.fake import MemoryEpic
from do_epic.backend.protocol import EpicIssue
from do_epic.parent_moves import moved
from do_epic.test_scheduler import issue
from failure import Failure
from do_epic.test_scheduler import issue
from do_epic.backend.fake import MemoryEpic
from do_epic.parent_moves import moved
UNBLOCKING = ("Release Ready", "Teach & Learn")