Description: Fix for test_render
 Fix for path and AssertionError in test_render, revised xml file
 for the updated sphinx.
Forwarded: not-needed
Author: Yogeswaran Umasankar <kd8mbd@gmail.com>
Last-Update: 2025-05-05

--- a/tests/test_render.py
+++ b/tests/test_render.py
@@ -1,5 +1,6 @@
 """Tests for the rendering."""
 import io
+import os
 from pathlib import Path
 from textwrap import dedent
 
@@ -11,9 +12,8 @@ from autodoc2.render.myst_ import MystRe
 from autodoc2.render.rst_ import RstRenderer
 from autodoc2.utils import yield_modules
 import pytest
+import sphinx
 from sphinx.testing.util import SphinxTestApp
-from sphinx.testing.util import path as sphinx_path
-
 
 @pytest.mark.parametrize(
     "renderer,extension",
@@ -93,8 +93,8 @@ def test_sphinx_build(tmp_path: Path, wi
     build = tmp_path / "build"
     app = SphinxTestApp(
         buildername="html",
-        srcdir=sphinx_path(source),
-        builddir=sphinx_path(build),
+        srcdir=Path(os.path.abspath(source)),
+        builddir=Path(os.path.abspath(build)),
         warning=warnings,
     )
     try:
@@ -136,8 +136,8 @@ def test_sphinx_build(tmp_path: Path, wi
     rebuild_warnings = io.StringIO()
     rebuild_app = SphinxTestApp(
         buildername="html",
-        srcdir=sphinx_path(source),
-        builddir=sphinx_path(build),
+        srcdir=Path(os.path.abspath(source)),
+        builddir=Path(os.path.abspath(build)),
         warning=rebuild_warnings,
     )
     try:
@@ -209,8 +209,8 @@ def test_sphinx_build_directives(tmp_pat
     build = tmp_path / "build"
     app = SphinxTestApp(
         buildername="html",
-        srcdir=sphinx_path(source),
-        builddir=sphinx_path(build),
+        srcdir=Path(os.path.abspath(source)),
+        builddir=Path(os.path.abspath(build)),
         warning=warnings,
     )
     try:
@@ -223,6 +223,11 @@ def test_sphinx_build_directives(tmp_pat
     doctree = app.env.get_doctree("index")
     doctree["source"] = "index.rst"
     content = "\n".join([line.rstrip() for line in doctree.pformat().splitlines()])
+    if sphinx.version_info < (8, 2):
+        content = content.replace(
+            '<desc_parameterlist multi_line_parameter_list="False"',
+            '<desc_parameterlist multi_line_parameter_list="False" multi_line_trailing_comma="True"',
+        )
     file_regression.check(content, extension=".xml")
 
 
--- a/tests/test_render/test_sphinx_build_directives.xml
+++ b/tests/test_render/test_sphinx_build_directives.xml
@@ -1,4 +1,4 @@
-<document source="index.rst">
+<document source="index.rst" translation_progress="{'total': 0, 'translated': 0}">
     <section ids="test" names="test">
         <title>
             Test
@@ -19,13 +19,13 @@
             ```
             ````
         <index entries="('single',\ 'func()\ (in\ module\ package)',\ 'package.func',\ '',\ None)">
-        <desc classes="py function" desctype="function" domain="py" nocontentsentry="False" noindex="False" noindexentry="False" objtype="function">
+        <desc classes="py function" desctype="function" domain="py" no-contents-entry="False" no-index="False" no-index-entry="False" no-typesetting="False" nocontentsentry="False" noindex="False" noindexentry="False" objtype="function">
             <desc_signature _toc_name="func()" _toc_parts="('package', 'func')" class="" classes="sig sig-object" fullname="func" ids="package.func" module="package">
                 <desc_addname classes="sig-prename descclassname" xml:space="preserve">
                     package.
                 <desc_name classes="sig-name descname" xml:space="preserve">
                     func
-                <desc_parameterlist xml:space="preserve">
+                <desc_parameterlist multi_line_parameter_list="False" multi_line_trailing_comma="True" xml:space="preserve">
                     <desc_parameter xml:space="preserve">
                         <desc_sig_name classes="n">
                             a
