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 14
14
CHALLENGES_DIR = Path (__file__ ).parent .parent / "challenges"
15
15
ALL_QUESTIONS = list (CHALLENGES_DIR .glob ("**/question.py" ))
16
16
ALL_SOLUTIONS = list (CHALLENGES_DIR .glob ("**/solution*.py" ))
17
+ ALL_HINTS = list (CHALLENGES_DIR .glob ("**/hints.md" ))
17
18
18
19
19
20
@pytest .fixture ()
@@ -35,3 +36,8 @@ def question_file(request):
35
36
@pytest .fixture (params = ALL_SOLUTIONS , ids = lambda x : x .parent .name )
36
37
def solution_file (request ):
37
38
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