File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1414CHALLENGES_DIR = Path (__file__ ).parent .parent / "challenges"
1515ALL_QUESTIONS = list (CHALLENGES_DIR .glob ("**/question.py" ))
1616ALL_SOLUTIONS = list (CHALLENGES_DIR .glob ("**/solution*.py" ))
17+ ALL_HINTS = list (CHALLENGES_DIR .glob ("**/hints.md" ))
1718
1819
1920@pytest .fixture ()
@@ -35,3 +36,8 @@ def question_file(request):
3536@pytest .fixture (params = ALL_SOLUTIONS , ids = lambda x : x .parent .name )
3637def solution_file (request ):
3738 return request .param
39+
40+
41+ @pytest .fixture (params = ALL_HINTS , ids = lambda x : x .parent .name )
42+ def hint_file (request ) -> Path :
43+ return request .param
Original file line number Diff line number Diff line change 1+ import re
2+ from pathlib import Path
3+
4+
5+ def test_link (hint_file : Path ):
6+ # Verify if python docs url link to English documentation
7+ matches = re .findall (
8+ r"https://docs.python.org/[a-zA-Z]+-?[a-zA-Z]+" ,
9+ hint_file .read_text (encoding = "utf-8" ),
10+ )
11+ assert len (matches ) == 0
You can’t perform that action at this time.
0 commit comments