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 eb80a58
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 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
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ disallow_untyped_defs = true
# 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 eb80a58

Please sign in to comment.