We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07e89a1 commit 4c4792eCopy full SHA for 4c4792e
tests/test_core.py
@@ -1,5 +1,6 @@
1
# stdlib
2
import re
3
+import sys
4
from typing import get_type_hints
5
6
# 3rd party
@@ -32,7 +33,12 @@ def test_get_sphinx_doc_url():
32
33
with pytest.raises(ValueError, match="Documentation URL not found in data from PyPI."):
34
get_sphinx_doc_url("sphinx-prompt")
35
- assert re.match(r"https://numpy\.org/doc/1\.\d\d/", get_sphinx_doc_url("numpy"))
36
+ if sys.version_info < (3, 8):
37
+ # Latest numpy's "Documentation" url doesn't point to Sphinx docs.
38
+ with pytest.raises(ValueError):
39
+ get_sphinx_doc_url("numpy")
40
+ else:
41
+ assert re.match(r"https://numpy\.org/doc/1\.\d\d/", get_sphinx_doc_url("numpy"))
42
43
assert get_sphinx_doc_url("matplotlib") == "https://matplotlib.org/"
44
0 commit comments