Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_extension_setup_errors[dotnetexample-override_conf2-AutoAPI fails with no internet #329

Closed
mjsir911 opened this issue Mar 4, 2022 · 1 comment

Comments

@mjsir911
Copy link
Contributor

mjsir911 commented Mar 4, 2022

Hi,

I'm packaging sphinx-autoapi for gentoo and in the process of testing it with a network sandbox I'm having trouble getting a test to pass without the optional dotnet package installed & no internet access to autodownload:

Test failures
================================================ FAILURES ================================================
_ TestExtensionErrors.test_extension_setup_errors[dotnetexample-override_conf2-AutoAPI of type `dotnet` requires following packages to be installed and included in extensions list: sphinxcontrib.dotnetdomain (available as "sphinxcontrib-dotnetdomain" on PyPI)] _

self = <test_integration.TestExtensionErrors object at 0x7fbd892d40a0>, proj_name = 'dotnetexample'
override_conf = {'autoapi_type': 'dotnet', 'extensions': ['autoapi.extension']}
err_msg = 'AutoAPI of type `dotnet` requires following packages to be installed and included in extensions list: sphinxcontrib.dotnetdomain (available as "sphinxcontrib-dotnetdomain" on PyPI)'

    @pytest.mark.parametrize(
        "proj_name, override_conf, err_msg",
        [
            (
                "toctreeexample",
                {"autoapi_type": "INVALID VALUE"},
                (
                    "Invalid autoapi_type setting, following values is "
                    'allowed: "dotnet", "go", "javascript", "python"'
                ),
            ),
            (
                "goexample",
                {"autoapi_type": "go", "extensions": ["autoapi.extension"]},
                (
                    "AutoAPI of type `go` requires following "
                    "packages to be installed and included in extensions list: "
                    "sphinxcontrib.golangdomain (available as "
                    '"sphinxcontrib-golangdomain" on PyPI)'
                ),
            ),
            (
                "dotnetexample",
                {"autoapi_type": "dotnet", "extensions": ["autoapi.extension"]},
                (
                    "AutoAPI of type `dotnet` requires following "
                    "packages to be installed and included in extensions list: "
                    "sphinxcontrib.dotnetdomain (available as "
                    '"sphinxcontrib-dotnetdomain" on PyPI)'
                ),
            ),
        ],
    )
    def test_extension_setup_errors(self, proj_name, override_conf, err_msg):
        with pytest.raises(ExtensionError) as err_info:
            with sphinx_build(proj_name, override_conf):
                pass
    
>       assert str(err_info.value) == err_msg
E       assert ('AutoAPI Directory '\n '`/var/tmp/portage/dev-python/sphinx-autoapi-1.8.4/work/sphinx-autoapi-1.8.4/tests/dotnetexample/example/Identity/src` '\n 'not found. Please check your `autoapi_dirs` setting.') == ('AutoAPI of type `dotnet` requires following packages to be installed and '\n 'included in extensions list: sphinxcontrib.dotnetdomain (available as '\n '"sphinxcontrib-dotnetdomain" on PyPI)')
E         - AutoAPI of type `dotnet` requires following packages to be installed and included in extensions list: sphinxcontrib.dotnetdomain (available as "sphinxcontrib-dotnetdomain" on PyPI)
E         + AutoAPI Directory `/var/tmp/portage/dev-python/sphinx-autoapi-1.8.4/work/sphinx-autoapi-1.8.4/tests/dotnetexample/example/Identity/src` not found. Please check your `autoapi_dirs` setting.

err_info   = <ExceptionInfo ExtensionError('AutoAPI Directory `/var/tmp/portage/dev-python/sphinx-autoapi-1.8.4/work/sphinx-autoapi-1.8.4/tests/dotnetexample/example/Identity/src` not found. Please check your `autoapi_dirs` setting.') tblen=7>
err_msg    = ('AutoAPI of type `dotnet` requires following packages to be installed and '
 'included in extensions list: sphinxcontrib.dotnetdomain (available as '
 '"sphinxcontrib-dotnetdomain" on PyPI)')
override_conf = {'autoapi_type': 'dotnet', 'extensions': ['autoapi.extension']}
proj_name  = 'dotnetexample'
self       = <test_integration.TestExtensionErrors object at 0x7fbd892d40a0>

tests/test_integration.py:170: AssertionError
------------------------------------------ Captured stdout call ------------------------------------------
Running Sphinx v4.3.2
making output directory... done
------------------------------------------ Captured stderr call ------------------------------------------
Cloning into '/var/tmp/portage/dev-python/sphinx-autoapi-1.8.4/work/sphinx-autoapi-1.8.4/tests/dotnetexample/example/Identity'...
fatal: unable to access 'https://github.com/aspnet/Identity/': Could not resolve host: github.com

To reproduce:

  1. clone repository
  2. make sure sphinxcontrib-dotnetdomain is not installed
  3. install dependencies necessary to pass tests (other than sphinxcontrib-dotnetdomain)
  4. turn off internet
  5. python3.8 -m pytest -vv -ra -l -Wdefault --color=yes -p no:cov -p no:flake8 -p no:flakes -p no:pylint
@AWhetter
Copy link
Collaborator

AWhetter commented Apr 7, 2023

Closing this now that we are dropping support for documenting languages other than Python. See #248 for more information on this decision.

@AWhetter AWhetter closed this as completed Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants