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:
@@ -9,7 +9,7 @@ import unittest
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from failure import Failure
|
||||
from chunk_preflight.gathered import forge_of, Gathered, ItemFacts, named_paths, NamedPath, NoItem, planned, Ran, Release, standing, Worktree, worktree_add
|
||||
from chunk_preflight.gathered import forge_of, Gathered, ItemFacts, named_paths, NamedPath, NoItem, planned, Ran, Release, Worktree, worktree_add
|
||||
from test_env import isolated_env
|
||||
from chunk_preflight.main import line_count, ran, seconds, TIMEOUT
|
||||
from chunk_preflight.facts import open_pulls, render, unreleased_entries
|
||||
@@ -387,31 +387,6 @@ class Plans(unittest.TestCase):
|
||||
self.assertEqual(planned(TODO[:TODO.index("## Details")], CUT, "origin/main").text, "**Do the next thing.**")
|
||||
|
||||
|
||||
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 = (
|
||||
(Release("v1.2.3", "", 4), (1, 2, 4), "next"),
|
||||
(Release("v1.2.3", "", 4), (1, 3, 0), "next"),
|
||||
(Release("v1.2.3", "", 4), (2, 0, 0), "next"),
|
||||
(Release(None, "", 4), (0, 2, 0), "next"),
|
||||
(Release(None, "", 4), None, "next"),
|
||||
(Release("v1.2.3-rc.1", "", 4), (1, 2, 3), "next"),
|
||||
(Release(Failure("tags unreadable"), "", 4), (0, 2, 0), "next"),
|
||||
(Release("v1.2.3", "", 4), (1, 2, 3), "cut"),
|
||||
(Release("v1.2.3", "", 4), (1, 2, 2), "cut"),
|
||||
(Release("v1.2.3", "", 4), (1, 2, 5), "finished"),
|
||||
(Release("v1.2.3", "", 4), (1, 3, 1), "finished"),
|
||||
(Release("v1.2.3", "", 4), (2, 0, 1), "finished"),
|
||||
(Release("v1.2.3", "", 4), None, "finished"),
|
||||
(Release("v1.2.3", "", 0), (1, 4, 0), "unplanned"),
|
||||
(Release("v1.2.3", "", 0), None, "unplanned"),
|
||||
(Release("v1.2.3", "", Failure("count unreadable")), (1, 4, 0), "unknown"),
|
||||
)
|
||||
for release, earliest, stands in cases:
|
||||
with self.subTest(release=release, earliest=earliest):
|
||||
self.assertEqual(standing(release, earliest), stands)
|
||||
|
||||
|
||||
class Gathering(unittest.TestCase):
|
||||
def test_counts_the_top_level_entries_under_unreleased(self):
|
||||
self.assertEqual(unreleased_entries(CHANGELOG), 2)
|
||||
|
||||
Reference in New Issue
Block a user