Skip to content

Commit 86a5fff

Browse files
committed
Improve the internal skipped-test helper messages.
1 parent b0f44a5 commit 86a5fff

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

jsonschema/tests/_helpers.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
1+
from urllib.parse import urljoin
2+
3+
4+
def issues_url(organization, repository):
5+
return urljoin(
6+
urljoin(
7+
urljoin("https://github.com", organization),
8+
repository,
9+
),
10+
"issues",
11+
)
12+
13+
14+
ISSUES_URL = issues_url("python-jsonschema", "jsonschema")
15+
TEST_SUITE_ISSUES_URL = issues_url("json-schema-org", "JSON-Schema-Test-Suite")
16+
17+
118
def bug(issue=None):
219
message = "A known bug."
320
if issue is not None:
4-
message += " See issue #{issue}.".format(issue=issue)
21+
message += f" See {urljoin(ISSUES_URL, str(issue))}."
522
return message
23+
24+
25+
def test_suite_bug(issue):
26+
return (
27+
"A known test suite bug. "
28+
f"See {urljoin(TEST_SUITE_ISSUES_URL, str(issue))}."
29+
)

0 commit comments

Comments
 (0)