Skip to content

Commit c9778cd

Browse files
committed
Add numpy to tests.
1 parent 914d669 commit c9778cd

11 files changed

+36
-9
lines changed

formate.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ known_third_party = [
4545
"html5lib",
4646
"importlib_metadata",
4747
"importlib_resources",
48+
"numpy",
4849
"packaging",
4950
"pypi_json",
5051
"pytest",

repo_helper.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,6 @@ extra_sphinx_extensions:
5959
sphinx_conf_epilogue:
6060
- " from sphinx_toolbox.latex import replace_unknown_unicode"
6161
- ' app.connect("build-finished", replace_unknown_unicode)'
62+
63+
tox_unmanaged:
64+
- testenv

tests/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ coverage>=5.1
33
coverage-pyver-pragma>=0.2.1
44
html5lib>=1.1
55
importlib-metadata>=3.6.0
6+
numpy~=1.22.0; python_version >= "3.8"
67
pytest>=6.0.0
78
pytest-cov>=2.8.1
89
pytest-datafiles>=2.0

tests/test_core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ def test_get_sphinx_doc_url():
3131
with pytest.raises(ValueError, match="Documentation URL not found in data from PyPI."):
3232
get_sphinx_doc_url("sphinx-prompt")
3333

34+
assert get_sphinx_doc_url("numpy") in {"https://numpy.org/doc/1.22/", "https://numpy.org/doc/1.21/"}
35+
3436

3537
def test_get_sphinx_doc_url_wrapping():
3638
assert get_sphinx_doc_url.__name__ == "get_sphinx_doc_url"

tests/test_requirements_parsers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515
requests>=2.24.0
1616
slumber>=0.7.1
1717
sphinx>=3.0.3
18+
numpy>=1.22.0
1819
sphinxcontrib-domaintools==0.3
1920
"""
2021

2122
expected_requirements_a = [
2223
"domdf-python-tools",
24+
"numpy",
2325
"packaging",
2426
"requests",
2527
"slumber",

tests/test_seeding.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
expected_mapping_a = {
2121
"domdf-python-tools": ("https://domdf-python-tools.readthedocs.io/en/latest/", None),
22+
"numpy": ("https://numpy.org/doc/1.22/", None),
2223
"packaging": ("https://packaging.pypa.io/en/latest/", None),
2324
"requests": ("https://docs.python-requests.org/en/latest/", None),
2425
"slumber": ("https://slumber.readthedocs.io/en/v0.6.0/", None),

tests/test_seeding_/test_sphinx_seed_intersphinx_mapping_mocked_example_requirements_a_flit_.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ 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.22/
8+
- - null
59
packaging:
610
- packaging
711
- - https://packaging.pypa.io/en/latest/

tests/test_seeding_/test_sphinx_seed_intersphinx_mapping_mocked_example_requirements_a_pyproject_.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ 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.22/
8+
- - null
59
packaging:
610
- packaging
711
- - https://packaging.pypa.io/en/latest/

tests/test_seeding_/test_sphinx_seed_intersphinx_mapping_mocked_example_requirements_a_pyproject_toml_.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ 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.22/
8+
- - null
59
packaging:
610
- packaging
711
- - https://packaging.pypa.io/en/latest/

tests/test_seeding_/test_sphinx_seed_intersphinx_mapping_mocked_example_requirements_a_requirements_.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ 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.22/
8+
- - null
59
packaging:
610
- packaging
711
- - https://packaging.pypa.io/en/latest/

tox.ini

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ test = py36, py37, py38, py39, py310-dev, pypy36, pypy37
2929
qa = mypy, lint
3030
cov = py36, coverage
3131

32-
[testenv]
33-
setenv =
34-
PYTHONDEVMODE=1
35-
PIP_DISABLE_PIP_VERSION_CHECK=1
36-
deps = -r{toxinidir}/tests/requirements.txt
37-
commands =
38-
python --version
39-
python -m pytest --cov=seed_intersphinx_mapping -r aR tests/ {posargs}
40-
4132
[testenv:docs]
4233
setenv = SHOW_TODOS = 1
4334
basepython = python3.8
@@ -170,3 +161,13 @@ package = seed_intersphinx_mapping
170161
[pytest]
171162
addopts = --color yes --durations 25
172163
timeout = 300
164+
165+
[testenv]
166+
setenv =
167+
PYTHONDEVMODE=1
168+
PIP_DISABLE_PIP_VERSION_CHECK=1
169+
PIP_EXTRA_INDEX_URL = https://domdfcoding.github.io/3.11-wheels/wheels/
170+
deps = -r{toxinidir}/tests/requirements.txt
171+
commands =
172+
python --version
173+
python -m pytest --cov=seed_intersphinx_mapping -r aR tests/ {posargs}

0 commit comments

Comments
 (0)