diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-06-29 09:49:22 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-06-29 18:17:19 +0200 |
commit | 8efabe9e7f23515a1d4eeaf9c1e01ff5b48cdf68 (patch) | |
tree | bf1b7776c54399a4d7346126a851395878abe299 /script/test_bump_changelog.py | |
parent | f3aaac38547e0dd9e1942a647e603465cf09ecff (diff) | |
download | astroid-git-8efabe9e7f23515a1d4eeaf9c1e01ff5b48cdf68.tar.gz |
Create a check function in bumb changelog script
Diffstat (limited to 'script/test_bump_changelog.py')
-rw-r--r-- | script/test_bump_changelog.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/script/test_bump_changelog.py b/script/test_bump_changelog.py index cfb27e42..a52c1c72 100644 --- a/script/test_bump_changelog.py +++ b/script/test_bump_changelog.py @@ -65,10 +65,10 @@ Release Date: TBA What's New in astroid 2.6.1? ============================ -Release Date: 2012-02-05 +Release Date: TBA """, "2.6.1", - "the next version '2.6.2' already exists", + "The text for the next version '2.6.2' already exists", ], [ """ @@ -98,7 +98,8 @@ Release Date: TBA ], ], ) -def test_update_content_error(old_content, version, expected_error): +def test_update_content_error(old_content, version, expected_error, caplog): + caplog.set_level(logging.DEBUG) with pytest.raises(AssertionError, match=expected_error): transform_content(old_content, version) @@ -132,4 +133,4 @@ Release Date: 20""" new_content = transform_content(old_content, "2.6.1") assert new_content.startswith( expected_beginning - ), f"Wrong start for:'{new_content[len(expected_beginning):]}'" + ), f"Wrong start for:'{new_content[:len(expected_beginning)]}'" |