File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ def extract_pypi_package_name(url: Optional[str]) -> Optional[str]:
93
93
url_is_correct = stripped_url .startswith (prefix )
94
94
if not url_is_correct :
95
95
raise ChangelogError (
96
- "Changelog needs a Github releases URL "
97
- f"(https://github.com/:owner/:repo/releases ). Received { url } "
96
+ "Changelog needs a PyPI project URL "
97
+ f"(https://pypi.org/project/:project ). Received { url } "
98
98
)
99
99
100
100
return stripped_url [len (prefix ) :] # noqa
Original file line number Diff line number Diff line change @@ -111,7 +111,9 @@ def test_extract_github_repo_name(url):
111
111
112
112
113
113
def test_extract_github_repo_name_error ():
114
- with pytest .raises (changelog .ChangelogError ):
114
+ with pytest .raises (
115
+ changelog .ChangelogError , match = "^Changelog needs a Github releases URL"
116
+ ):
115
117
changelog .extract_github_repo_name ("https://example.com" )
116
118
117
119
@@ -123,7 +125,9 @@ def test_extract_pypi_package_name(url):
123
125
124
126
125
127
def test_extract_pypi_package_name_error ():
126
- with pytest .raises (changelog .ChangelogError ):
128
+ with pytest .raises (
129
+ changelog .ChangelogError , match = "^Changelog needs a PyPI project URL"
130
+ ):
127
131
changelog .extract_pypi_package_name ("https://example.com" )
128
132
129
133
You can’t perform that action at this time.
0 commit comments