Skip to content

Commit 4aa94ca

Browse files
committed
Minor change
1 parent 8d8555f commit 4aa94ca

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tutorials.py renamed to check_tutorials.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,15 @@ def pattern_found(pattern, html):
4545

4646
if __name__ == '__main__':
4747
tutorial_urls = get_tutorial_urls()
48+
found = False
4849
for url in tutorial_urls:
4950
html = url_to_html(url)
50-
# Check for various errors, warnings
51+
# Add additional errors, warnings to this list
5152
patterns = [r'HTTPError', r'FutureWarning:']
5253
for pattern in patterns:
5354
if pattern_found(pattern, html):
55+
found = True
5456
print(f'"{pattern}" found in "{url}"')
57+
58+
if found:
59+
raise ValueError("One or more warnings/errors were found")

0 commit comments

Comments
 (0)