executablebooks / sphinx-tabs

Tabbed views for Sphinx
https://sphinx-tabs.readthedocs.io
MIT License
263 stars 67 forks source link

3.4.4: pytest is failing #185

Open kloczek opened 8 months ago

kloczek commented 8 months ago

Describe the bug

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

```console + 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 = >, test_params = {'shared_result': None}, shared_result = 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 = >, test_params = {'shared_result': None}, shared_result = 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 = >, test_params = {'shared_result': None} shared_result = , 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 = >, test_params = {'shared_result': None} shared_result = , 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 = >, test_params = {'shared_result': None} shared_result = , 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 = >, test_params = {'shared_result': None} shared_result = , 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 = >, test_params = {'shared_result': None} shared_result = , 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 = >, test_params = {'shared_result': None} shared_result = , 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 = >, test_params = {'shared_result': None} shared_result = , 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 = >, test_params = {'shared_result': None}, shared_result = 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 = >, test_params = {'shared_result': None}, shared_result = 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 = >, test_params = {'shared_result': None}, shared_result = 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 = >, test_params = {'shared_result': None} shared_result = , 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 = >, test_params = {'shared_result': None} shared_result = , 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.

List your environment

Here is list of installed modules in build env

```console 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 ```
foster999 commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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

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 commented 4 months ago

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 =======================================================================