File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 44import httpx
55import nbformat
66import pytest
7- from utils_for_tests import iterate_notebooks
7+ from utils_for_tests import iterate_notebook_names , resolve_notebook_path
88
99# the regex below is taken from this stackoverflow:
1010# https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url
1515URL_IN_MARKDOWN_REGEX = re .compile (r"(?<=\]\()%s(?=\s*\))" % URL_REGEX )
1616
1717
18- @pytest .mark .parametrize ("notebook_path" , iterate_notebooks ())
18+ @pytest .mark .parametrize ("notebook_path" , iterate_notebook_names ())
1919def test_links (notebook_path : str ) -> None :
2020 for cell_index , url in iterate_links_from_notebook (notebook_path ):
2121 assert _test_single_url (
@@ -24,7 +24,7 @@ def test_links(notebook_path: str) -> None:
2424
2525
2626def iterate_links_from_notebook (filename : str ) -> Iterable [tuple [int , str ]]:
27- with open (filename ) as f :
27+ with open (resolve_notebook_path ( filename ) ) as f :
2828 notebook_data = nbformat .read (f , nbformat .NO_CONVERT )
2929
3030 markdown_cells = [c for c in notebook_data ["cells" ] if c ["cell_type" ] == "markdown" ]
You can’t perform that action at this time.
0 commit comments