Skip to content

Commit

Permalink
adding SKEAPED_URLS list
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadav Ben Ami authored and ravidalon committed Dec 19, 2024
1 parent ebfc6a5 commit 8de419c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
URL_REGEX = r"https?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b[-a-zA-Z0-9@:%_\+.~#?&//=]*"
# urls come in `[title](url)`
URL_IN_MARKDOWN_REGEX = re.compile(r"(?<=\]\()%s(?=\s*\))" % URL_REGEX)
SKIPPED_URLS = [
"https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.69.607", # From date: 19.12.24, notebook: hamiltonian_simulation_guide.ipynb
]


def test_links() -> None:
Expand All @@ -34,6 +37,8 @@ def iterate_links_from_notebook(filename: str) -> Iterable[tuple[int, str]]:


def _test_single_url(url: str, retry: int = 3) -> bool:
if url in SKIPPED_URLS:
return True
if retry == 0:
return False

Expand Down

0 comments on commit 8de419c

Please sign in to comment.