Skip to content

Commit b96c9ee

Browse files
committed
fix source lines test
1 parent 1dd94a4 commit b96c9ee

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tests/test_rtd_github_links.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
import re
6+
import sys
67
import textwrap
78
from typing import TYPE_CHECKING
89
from pathlib import Path, PurePosixPath
@@ -149,7 +150,19 @@ def test_as_function(
149150
assert github_url(f"scanpydoc.{module}.{name}") == f"{prefix}/{obj_path}#L{s}-L{e}"
150151

151152

152-
@pytest.mark.parametrize("cls", [dict, Mapping])
153+
@pytest.mark.parametrize(
154+
"cls",
155+
[
156+
pytest.param(dict, id="dict"),
157+
pytest.param(
158+
Mapping,
159+
marks=pytest.mark.skipif(
160+
sys.version_info >= (3, 13),
161+
reason="In Python 3.13+, Mapping is a regular class",
162+
),
163+
),
164+
],
165+
)
153166
def test_no_line_nos_for_unavailable_source(cls: type) -> None:
154167
start, end = _get_linenos(cls)
155168
assert start is end is None

0 commit comments

Comments
 (0)