Answer architecture round 3: 0 🔴, 1 🟡; pick the next chunk's item in one function, todo_table.chunk_item, which routing and the preflight both call, so routing names no item where the release after the last cut has none
This commit is contained in:
@@ -415,6 +415,31 @@ class Blockers(unittest.TestCase):
|
||||
self.assertEqual(todo_table.items(f"## Items\n\n{header}"), Failure(f"the table under {header} has no |---| divider line"))
|
||||
|
||||
|
||||
class Standing(unittest.TestCase):
|
||||
def test_takes_the_earliest_release_where_it_is_the_next_patch_minor_or_major_or_no_tag_names_a_version(self):
|
||||
cases = (
|
||||
("v1.2.3", 4, (1, 2, 4), "next"),
|
||||
("v1.2.3", 4, (1, 3, 0), "next"),
|
||||
("v1.2.3", 4, (2, 0, 0), "next"),
|
||||
(None, 4, (0, 2, 0), "next"),
|
||||
(None, 4, None, "next"),
|
||||
("v1.2.3-rc.1", 4, (1, 2, 3), "next"),
|
||||
(Failure("tags unreadable"), 4, (0, 2, 0), "next"),
|
||||
("v1.2.3", 4, (1, 2, 3), "cut"),
|
||||
("v1.2.3", 4, (1, 2, 2), "cut"),
|
||||
("v1.2.3", 4, (1, 2, 5), "finished"),
|
||||
("v1.2.3", 4, (1, 3, 1), "finished"),
|
||||
("v1.2.3", 4, (2, 0, 1), "finished"),
|
||||
("v1.2.3", 4, None, "finished"),
|
||||
("v1.2.3", 0, (1, 4, 0), "unplanned"),
|
||||
("v1.2.3", 0, None, "unplanned"),
|
||||
("v1.2.3", Failure("count unreadable"), (1, 4, 0), "unknown"),
|
||||
)
|
||||
for tag, commits, earliest, stands in cases:
|
||||
with self.subTest(tag=tag, commits=commits, earliest=earliest):
|
||||
self.assertEqual(todo_table.standing(tag, commits, earliest), stands)
|
||||
|
||||
|
||||
class Main(unittest.TestCase):
|
||||
def run_main(self, *argv):
|
||||
with contextlib.redirect_stdout(io.StringIO()), contextlib.redirect_stderr(io.StringIO()) as said:
|
||||
|
||||
Reference in New Issue
Block a user