Skip to content

Commit d3bd482

Browse files
tests/test_release.py: test_release_changelog_version(): cope with date in top changelog item.
1 parent fe13b17 commit d3bd482

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_release.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def test_release_changelog_version():
6565
p = f'{g_root}/changes.txt'
6666
with open(p) as f:
6767
text = f.read()
68-
m = re.search(f'\n[*][*]Changes in version ([0-9.]+)[*][*]\n', text)
68+
# We match `**Changes in version a.b.c**' optionally followed by ` (YYYY-MM-DD)`.
69+
m = re.search(f'\n[*][*]Changes in version ([0-9.]+)[*][*]( [([0-9-]+[)])?\n', text)
6970
assert m, f'Cannot parse {p}.'
7071
assert m[1] == setup.version_p, \
7172
f'{_file_line(p, text, m)}: Cannot find {setup.version_p=} in first changelog item: {m[0].strip()!r}.'

0 commit comments

Comments
 (0)