--- setup.cfg | 2 ++ tests/test_sphinx_autodoc_typehints.py | 4 ++++ 2 files changed, 6 insertions(+) --- a/setup.cfg +++ b/setup.cfg @@ -43,6 +43,8 @@ max-line-length = 99 [tool:pytest] addopts = -rsx --tb=short testpaths = tests +markers = + network: marks tests which require network connection [egg_info] tag_build = --- a/tests/test_sphinx_autodoc_typehints.py +++ b/tests/test_sphinx_autodoc_typehints.py @@ -95,6 +95,8 @@ def test_parse_annotation(annotation, mo assert get_annotation_args(annotation, module, class_name) == args +# requires inv fixtures which doesn't work without network connection +@pytest.mark.network @pytest.mark.parametrize('annotation, expected_result', [ (str, ':py:class:`str`'), (int, ':py:class:`int`'), @@ -177,6 +179,8 @@ def test_format_annotation(inv, annotati assert m.group('role') == expected_role +# requires inv fixtures which doesn't work without network connection +@pytest.mark.network @pytest.mark.parametrize('library', [typing, typing_extensions], ids=['typing', 'typing_extensions']) @pytest.mark.parametrize('annotation, params, expected_result', [