Skip to content

Commit

Permalink
Mark tests that use the network
Browse files Browse the repository at this point in the history
These two tests uses intersphinx, and the marker allows skipping them if
there is no network available.
  • Loading branch information
QuLogic committed Oct 12, 2024
1 parent b71782a commit 486e78e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
1 change: 1 addition & 0 deletions docs/changes/462.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Mark tests that use the network
18 changes: 4 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,10 @@ ignore_missing_imports = true
module = "autoapi.documenters"
ignore_errors = true

[[tool.mypy.overrides]]
module = "autoapi._astroid_utils"

# Strongly recommend enabling this one as soon as you can
check_untyped_defs = true

# These next few are various gradations of forcing use of type annotations
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_untyped_defs = true

# This one can be tricky to get passing if you use a lot of untyped libraries
# Ignore until astroid is typed (https://github.com/pylint-dev/astroid/issues/2060)
warn_return_any = false
[tool.pytest.ini_options]
markers = [
"network: Tests that use network access.",
]

[tool.ruff.lint.pydocstyle]
convention = "google"
Expand Down
2 changes: 2 additions & 0 deletions tests/python/test_pyintegration.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ def test_integration(self, parse):
assert "f_no_cd(a: int, b: int, /, *, e: float, f: float)" in f_no_cd.text


@pytest.mark.network
@pytest.mark.skipif(
sys.version_info < (3, 10), reason="Union pipe syntax requires Python >=3.10"
)
Expand Down Expand Up @@ -700,6 +701,7 @@ def test_integration(self, parse):
assert links[1].text == "None"


@pytest.mark.network
@pytest.mark.skipif(
sys.version_info < (3, 12), reason="PEP-695 support requires Python >=3.12"
)
Expand Down

0 comments on commit 486e78e

Please # to comment.