summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-06-26 14:07:18 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-06-29 18:17:19 +0200
commit34c8a49474ad5cd1c7e0fe4855cf272136790746 (patch)
treee7a4bac1fc7aa58a89d2c400ea64671c4f059738 /script
parent92e0679a1a6c0bbcc0aa0870ad7f02544176c78c (diff)
downloadastroid-git-34c8a49474ad5cd1c7e0fe4855cf272136790746.tar.gz
Permit to test the version in script/test_bump_changelog.py
Diffstat (limited to 'script')
-rw-r--r--script/test_bump_changelog.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/script/test_bump_changelog.py b/script/test_bump_changelog.py
index 1adb3e02..dc05742f 100644
--- a/script/test_bump_changelog.py
+++ b/script/test_bump_changelog.py
@@ -10,10 +10,14 @@ def test_get_next_version(version, expected):
@pytest.mark.parametrize(
- "old_content,expected_error",
+ "old_content,version,expected_error",
[
[
"""
+What's New in astroid 2.7.0?
+============================
+Release Date: TBA
+
What's New in astroid 2.6.1?
============================
Release Date: TBA
@@ -22,6 +26,7 @@ What's New in astroid 2.6.0?
============================
Release Date: TBA
""",
+ "2.6.1",
"More than one release date 'TBA'",
],
[
@@ -33,6 +38,7 @@ What's New in astroid 2.6.0?
============================
Release Date: TBA
""",
+ "2.6.1",
"text for this version '2.6.1' did not exists",
],
[
@@ -45,13 +51,14 @@ What's New in astroid 2.6.1?
============================
Release Date: 2012-02-05
""",
+ "2.6.1",
"the next version '2.6.2' already exists",
],
],
)
-def test_update_content_error(old_content, expected_error):
+def test_update_content_error(old_content, version, expected_error):
with pytest.raises(AssertionError, match=expected_error):
- transform_content(old_content, "2.6.1")
+ transform_content(old_content, version)
def test_update_content():