Skip to content

Commit 870e4eb

Browse files
committed
Rework numpy test as it only supports 3.9 now
1 parent 685eb24 commit 870e4eb

7 files changed

+3
-25
lines changed

tests/test_core.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# stdlib
2+
import re
23
from typing import get_type_hints
34

45
# 3rd party
@@ -31,12 +32,7 @@ def test_get_sphinx_doc_url():
3132
with pytest.raises(ValueError, match="Documentation URL not found in data from PyPI."):
3233
get_sphinx_doc_url("sphinx-prompt")
3334

34-
assert get_sphinx_doc_url("numpy") in {
35-
"https://numpy.org/doc/1.24/",
36-
"https://numpy.org/doc/1.23/",
37-
"https://numpy.org/doc/1.22/",
38-
"https://numpy.org/doc/1.21/",
39-
}
35+
assert re.match(r"https://numpy\.org/doc/1\.\d\d/", get_sphinx_doc_url("numpy"))
4036

4137
assert get_sphinx_doc_url("matplotlib") == "https://matplotlib.org/"
4238

tests/test_requirements_parsers.py

-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@
1919
requests>=2.24.0
2020
slumber>=0.7.1
2121
sphinx>=3.0.3
22-
numpy>=1.22.0
2322
sphinxcontrib-domaintools==0.3
2423
"""
2524

2625
expected_requirements_a = [
2726
"domdf-python-tools",
28-
"numpy",
2927
"packaging",
3028
"requests",
3129
"slumber",

tests/test_seeding.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
expected_mapping_a = {
2323
"domdf-python-tools": ("https://domdf-python-tools.readthedocs.io/en/latest/", None),
24-
"numpy": ("https://numpy.org/doc/1.24/", None),
24+
# "numpy": ("https://numpy.org/doc/1.25/", None),
2525
"packaging": ("https://packaging.pypa.io/en/stable/", None),
2626
"requests": ("https://requests.readthedocs.io/en/latest/", None),
2727
"slumber": ("https://slumber.readthedocs.io/en/v0.6.0/", None),

tests/test_seeding_/test_sphinx_seed_intersphinx_mapping_mocked_example_requirements_a_flit_.yml

-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ domdf-python-tools:
22
- domdf-python-tools
33
- - https://domdf-python-tools.readthedocs.io/en/latest/
44
- - null
5-
numpy:
6-
- numpy
7-
- - https://numpy.org/doc/1.24/
8-
- - null
95
packaging:
106
- packaging
117
- - https://packaging.pypa.io/en/stable/

tests/test_seeding_/test_sphinx_seed_intersphinx_mapping_mocked_example_requirements_a_pyproject_.yml

-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ domdf-python-tools:
22
- domdf-python-tools
33
- - https://domdf-python-tools.readthedocs.io/en/latest/
44
- - null
5-
numpy:
6-
- numpy
7-
- - https://numpy.org/doc/1.24/
8-
- - null
95
packaging:
106
- packaging
117
- - https://packaging.pypa.io/en/stable/

tests/test_seeding_/test_sphinx_seed_intersphinx_mapping_mocked_example_requirements_a_pyproject_toml_.yml

-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ domdf-python-tools:
22
- domdf-python-tools
33
- - https://domdf-python-tools.readthedocs.io/en/latest/
44
- - null
5-
numpy:
6-
- numpy
7-
- - https://numpy.org/doc/1.24/
8-
- - null
95
packaging:
106
- packaging
117
- - https://packaging.pypa.io/en/stable/

tests/test_seeding_/test_sphinx_seed_intersphinx_mapping_mocked_example_requirements_a_requirements_.yml

-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ domdf-python-tools:
22
- domdf-python-tools
33
- - https://domdf-python-tools.readthedocs.io/en/latest/
44
- - null
5-
numpy:
6-
- numpy
7-
- - https://numpy.org/doc/1.24/
8-
- - null
95
packaging:
106
- packaging
117
- - https://packaging.pypa.io/en/stable/

0 commit comments

Comments
 (0)