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

3.4.4: pytest is failing #185

Open
kloczek opened this issue Nov 6, 2023 · 4 comments
Open

3.4.4: pytest is failing #185

kloczek opened this issue Nov 6, 2023 · 4 comments
Labels

Comments

@kloczek
Copy link
Contributor

kloczek commented Nov 6, 2023

Describe the bug

Looks like pytest is failing in all units.
Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-tabs-3.4.4-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-tabs-3.4.4-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4
plugins: datadir-1.5.0, regressions-2.5.0
collected 14 items

tests/test_build.py EEEEEEEEEEEEEE                                                                                                                                                    [100%]

========================================================================================== ERRORS ===========================================================================================
_______________________________________________________________________________ ERROR at setup of test_basic ________________________________________________________________________________

request = <SubRequest 'app_params' for <Function test_basic>>, test_params = {'shared_result': None}, shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb711cb0d0>
sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41'), rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
______________________________________________________________________________ ERROR at setup of test_no_tabs _______________________________________________________________________________

request = <SubRequest 'app_params' for <Function test_no_tabs>>, test_params = {'shared_result': None}, shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb712329a0>
sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41'), rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
_____________________________________________________________________ ERROR at setup of test_conditional_assets[index] ______________________________________________________________________

request = <SubRequest 'app_params' for <Function test_conditional_assets[index]>>, test_params = {'shared_result': None}
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb7117d730>, sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41')
rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
____________________________________________________________________ ERROR at setup of test_conditional_assets[no_tabs1] ____________________________________________________________________

request = <SubRequest 'app_params' for <Function test_conditional_assets[no_tabs1]>>, test_params = {'shared_result': None}
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb711568b0>, sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41')
rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
____________________________________________________________________ ERROR at setup of test_conditional_assets[no_tabs2] ____________________________________________________________________

request = <SubRequest 'app_params' for <Function test_conditional_assets[no_tabs2]>>, test_params = {'shared_result': None}
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb71157fd0>, sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41')
rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
____________________________________________________________ ERROR at setup of test_conditional_assets_html_assets_policy[index] ____________________________________________________________

request = <SubRequest 'app_params' for <Function test_conditional_assets_html_assets_policy[index]>>, test_params = {'shared_result': None}
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb71157fa0>, sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41')
rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
__________________________________________________________ ERROR at setup of test_conditional_assets_html_assets_policy[no_tabs1] ___________________________________________________________

request = <SubRequest 'app_params' for <Function test_conditional_assets_html_assets_policy[no_tabs1]>>, test_params = {'shared_result': None}
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb711568e0>, sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41')
rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
__________________________________________________________ ERROR at setup of test_conditional_assets_html_assets_policy[no_tabs2] ___________________________________________________________

request = <SubRequest 'app_params' for <Function test_conditional_assets_html_assets_policy[no_tabs2]>>, test_params = {'shared_result': None}
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb7117d370>, sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41')
rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
_________________________________________________________________________ ERROR at setup of test_other_with_assets __________________________________________________________________________

request = <SubRequest 'app_params' for <Function test_other_with_assets>>, test_params = {'shared_result': None}
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb7115be80>, sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41')
rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
___________________________________________________________________________ ERROR at setup of test_nested_markup ____________________________________________________________________________

request = <SubRequest 'app_params' for <Function test_nested_markup>>, test_params = {'shared_result': None}, shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb711910a0>
sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41'), rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
____________________________________________________________________________ ERROR at setup of test_custom_lexer ____________________________________________________________________________

request = <SubRequest 'app_params' for <Function test_custom_lexer>>, test_params = {'shared_result': None}, shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb7115bdf0>
sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41'), rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
___________________________________________________________________________ ERROR at setup of test_rinohtype_pdf ____________________________________________________________________________

request = <SubRequest 'app_params' for <Function test_rinohtype_pdf>>, test_params = {'shared_result': None}, shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb711cb160>
sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41'), rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
__________________________________________________________________________ ERROR at setup of test_disable_closing ___________________________________________________________________________

request = <SubRequest 'app_params' for <Function test_disable_closing>>, test_params = {'shared_result': None}
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb71195550>, sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41')
rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
________________________________________________________________________ ERROR at setup of test_disable_css_loading _________________________________________________________________________

request = <SubRequest 'app_params' for <Function test_disable_css_loading>>, test_params = {'shared_result': None}
shared_result = <sphinx.testing.fixtures.SharedResult object at 0x7fdb711ac0d0>, sphinx_test_tempdir = path('/tmp/pytest-of-tkloczko/pytest-41')
rootdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.4/tests/roots')

    @pytest.fixture()
    def app_params(request: Any, test_params: dict, shared_result: SharedResult,
                   sphinx_test_tempdir: str, rootdir: str) -> tuple[dict, dict]:
        """
        Parameters that are specified by 'pytest.mark.sphinx' for
        sphinx.application.Sphinx initialization
        """

        # ##### process pytest.mark.sphinx

        pargs = {}
        kwargs: dict[str, Any] = {}

        # to avoid stacking positional args
        for info in reversed(list(request.node.iter_markers("sphinx"))):
            for i, a in enumerate(info.args):
                pargs[i] = a
            kwargs.update(info.kwargs)

        args = [pargs[i] for i in sorted(pargs.keys())]

        # ##### process pytest.mark.test_params
        if test_params['shared_result']:
            if 'srcdir' in kwargs:
                raise pytest.Exception('You can not specify shared_result and '
                                       'srcdir in same time.')
            kwargs['srcdir'] = test_params['shared_result']
            restore = shared_result.restore(test_params['shared_result'])
            kwargs.update(restore)

        # ##### prepare Application params

        testroot = kwargs.pop('testroot', 'root')
        kwargs['srcdir'] = srcdir = sphinx_test_tempdir / kwargs.get('srcdir', testroot)

        # special support for sphinx/tests
        if rootdir and not srcdir.exists():
            testroot_path = rootdir / ('test-' + testroot)
>           testroot_path.copytree(srcdir)
E           AttributeError: 'PosixPath' object has no attribute 'copytree'

/usr/lib/python3.8/site-packages/sphinx/testing/fixtures.py:96: AttributeError
================================================================================== short test summary info ==================================================================================
ERROR tests/test_build.py::test_basic - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_no_tabs - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_conditional_assets[index] - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_conditional_assets[no_tabs1] - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_conditional_assets[no_tabs2] - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_conditional_assets_html_assets_policy[index] - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_conditional_assets_html_assets_policy[no_tabs1] - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_conditional_assets_html_assets_policy[no_tabs2] - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_other_with_assets - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_nested_markup - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_custom_lexer - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_rinohtype_pdf - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_disable_closing - AttributeError: 'PosixPath' object has no attribute 'copytree'
ERROR tests/test_build.py::test_disable_css_loading - AttributeError: 'PosixPath' object has no attribute 'copytree'
==================================================================================== 14 errors in 0.31s =====================================================================================

Reproduce the bug

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix> using 'installer` module
  • run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
  • build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")

List your environment

Here is list of installed modules in build env

Package                       Version
----------------------------- -------
alabaster                     0.7.13
Babel                         2.13.1
beautifulsoup4                4.12.2
build                         1.0.3
charset-normalizer            3.3.2
cppclean                      0.13
distro                        1.8.0
docutils                      0.20.1
exceptiongroup                1.1.3
gpg                           1.23.0
idna                          3.4
imagesize                     1.4.1
importlib-metadata            6.8.0
iniconfig                     2.0.0
installer                     0.7.0
Jinja2                        3.1.2
MarkupSafe                    2.1.3
packaging                     23.2
pluggy                        1.3.0
Pygments                      2.16.1
pyproject_hooks               1.0.0
pytest                        7.4.3
pytest-datadir                1.5.0
pytest-regressions            2.5.0
python-dateutil               2.8.2
pytz                          2023.3
PyYAML                        6.0.1
requests                      2.31.0
setuptools                    68.2.2
six                           1.16.0
snowballstemmer               2.2.0
soupsieve                     2.5
Sphinx                        7.1.2
sphinxcontrib-applehelp       1.0.4
sphinxcontrib-devhelp         1.0.5
sphinxcontrib-htmlhelp        2.0.4
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.9
tomli                         2.0.1
urllib3                       1.26.18
wheel                         0.41.3
zipp                          3.17.0
@kloczek kloczek added the bug label Nov 6, 2023
@foster999
Copy link
Collaborator

Our CI is passing all tests, so you could look to reproduce the CI environment if you want them to pass

Many of the tests will fail with older dependencies, but most of these won't cause an issue with the functionality of the code

@kloczek
Copy link
Contributor Author

kloczek commented Jan 21, 2024

I have no access to list of modules installed in your CI.
Can you provide that list or compare with that one which I've provided?

@foster999
Copy link
Collaborator

The commands run by the CI are here, but in short for Python tests:

  • create a fresh virtual environment with one of python 3.9 - 3.12
  • install dependencies using 'pip install sphinx-tabs[testing]'

The dependencies are listed in setup.py/requirements.txt if it would be useful to see them. For those that aren't pinned the tests may only pass for the latest version, but the package likely works with earlier versions

@kloczek
Copy link
Contributor Author

kloczek commented Mar 11, 2024

Small update.
I've moved to python 3.9 and pytest 8.1.x. I still have no packaged rinohtype so for now I'm deselecting unit which uses that module.
Test suite seems is ok however I see some pytest warnings

===================================================================================== warnings summary ======================================================================================
tests/test_build.py: 12 warnings
  /home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.5/sphinx_tabs/tabs.py:335: RemovedInSphinx90Warning: The str interface for _JavaScript objects is deprecated. Use js.filename instead.
    if path.suffix == ".js" and path.as_posix() in context["script_files"]:

tests/test_build.py: 12 warnings
  /home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.5/sphinx_tabs/tabs.py:336: RemovedInSphinx90Warning: The str interface for _JavaScript objects is deprecated. Use js.filename instead.
    context["script_files"].remove(path.as_posix())

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================= 13 passed, 1 deselected, 24 warnings in 2.63s =======================================================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants