Skip to content

Commit 3f4f0d7

Browse files
Fix test_links_valid
1 parent ef1e585 commit 3f4f0d7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tripy/tests/test_ux.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ def test_links_valid(self, readme):
5454
continue
5555

5656
if link.startswith("https://"):
57-
assert requests.get(link).status_code == 200
57+
# Separating the requests.get(link) into a separate step since otherwise the
58+
# pytest backtrace becomes unreadably large.
59+
link_status = requests.get(link).status_code
60+
assert link_status == 200, f"Broken link: {link}"
5861
else:
5962
assert os.path.sep * 2 not in link, f"Duplicate slashes break links in GitHub. Link was: {link}"
6063
SOURCE_TAG = "source:"

0 commit comments

Comments
 (0)