We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 895f5df commit c717cccCopy full SHA for c717ccc
tripy/tests/test_ux.py
@@ -54,9 +54,15 @@ def test_links_valid(self, readme):
54
continue
55
56
if link.startswith("https://"):
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
+ link_status = None
+ for _ in range(15): # Try several times since some links are a bit flaky
+ try:
60
+ link_status = requests.get(link).status_code
61
+ except:
62
+ # Suppress verbose errors
63
+ pass
64
+ else:
65
+ break
66
assert link_status == 200, f"Broken link: {link}"
67
else:
68
assert os.path.sep * 2 not in link, f"Duplicate slashes break links in GitHub. Link was: {link}"
0 commit comments