Skip to content

Commit 391501f

Browse files
committed
test(changelog): cover more smart tag range test cases
1 parent a0cc490 commit 391501f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/test_changelog.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,25 @@ def test_get_smart_tag_range_returns_an_extra_for_a_single_tag(tags):
15371537
assert 2 == len(res)
15381538

15391539

1540+
def test_get_smart_tag_range_returns_an_empty_list_for_nonexistent_end_tag(tags):
1541+
start = tags[0]
1542+
res = changelog.get_smart_tag_range(tags, start.name, "nonexistent")
1543+
assert len(tags) == len(res)
1544+
1545+
1546+
def test_get_smart_tag_range_returns_an_empty_list_for_nonexistent_start_tag(tags):
1547+
end = tags[0]
1548+
res = changelog.get_smart_tag_range(tags, "nonexistent", end.name)
1549+
assert 1 == len(res)
1550+
1551+
1552+
def test_get_smart_tag_range_returns_an_empty_list_for_nonexistent_start_and_end_tags(
1553+
tags,
1554+
):
1555+
res = changelog.get_smart_tag_range(tags, "nonexistent", "nonexistent")
1556+
assert 0 == len(res)
1557+
1558+
15401559
@dataclass
15411560
class TagDef:
15421561
name: str

0 commit comments

Comments
 (0)