diff options
-rw-r--r-- | script/test_bump_changelog.py | 13 |
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(): |