Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-autodocsumm for 
openSUSE:Factory checked in at 2022-05-03 21:19:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-autodocsumm (Old)
 and      /work/SRC/openSUSE:Factory/.python-autodocsumm.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-autodocsumm"

Tue May  3 21:19:16 2022 rev:5 rq:974527 version:0.2.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-autodocsumm/python-autodocsumm.changes    
2021-07-10 22:55:10.931443794 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-autodocsumm.new.1538/python-autodocsumm.changes
  2022-05-03 21:19:25.697032983 +0200
@@ -1,0 +2,7 @@
+Mon May  2 21:38:13 UTC 2022 - Ferdinand Thiessen <r...@fthiessen.de>
+
+- Update to 0.2.8
+  * Fix: no links generated in summary table
+  * Fix: Sphinx dependencies
+
+-------------------------------------------------------------------

Old:
----
  autodocsumm-0.2.6.tar.gz

New:
----
  autodocsumm-0.2.8.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-autodocsumm.spec ++++++
--- /var/tmp/diff_new_pack.qoVxjc/_old  2022-05-03 21:19:26.209033624 +0200
+++ /var/tmp/diff_new_pack.qoVxjc/_new  2022-05-03 21:19:26.213033629 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-autodocsumm
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-autodocsumm
-Version:        0.2.6
+Version:        0.2.8
 Release:        0
 Summary:        Extended sphinx autodoc including automatic autosummaries
 License:        GPL-2.0-only
@@ -29,10 +29,11 @@
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-Sphinx >= 2.2
+Requires:       (python-Sphinx >= 2.2 and python-Sphinx < 5.0)
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module Sphinx >= 2.2}
+BuildRequires:  %{python_module beautifulsoup4}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module sphinx-testing}
 # /SECTION

++++++ autodocsumm-0.2.6.tar.gz -> autodocsumm-0.2.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autodocsumm-0.2.6/.github/workflows/python-app.yml 
new/autodocsumm-0.2.8/.github/workflows/python-app.yml
--- old/autodocsumm-0.2.6/.github/workflows/python-app.yml      2021-06-28 
20:34:58.000000000 +0200
+++ new/autodocsumm-0.2.8/.github/workflows/python-app.yml      2022-04-19 
13:20:18.000000000 +0200
@@ -14,8 +14,13 @@
 
     strategy:
       matrix:
-        python-version: [3.6, 3.7, 3.8]
-        sphinx-version: ["", "4.0.*", "3.5.*", "3.4.*", "3.2.*",  "3.1.*", 
"3.0.*", "2.4.*", "2.3.*", "2.2.*"]
+        python-version: ["3.6", "3.7", "3.8", "3.9"]
+        sphinx-version: ["", "4.5", "4.4", "4.3", "4.2", "4.1", "4.0.*", 
"3.5.*", "3.4.*", "3.2.*",  "3.1.*", "3.0.*"]
+        include:
+          - python-version: "3.10"
+            sphinx-version: ""
+          - python-version: "3.10"
+            sphinx-version: "4.5"
 
     steps:
     - uses: actions/checkout@v2
@@ -31,10 +36,12 @@
       run: |
         python -m pip install --upgrade pip
         SPHINX=Sphinx
+        JINJA2=jinja2
         if [[ $SPHINX_VERSION != "" ]]; then
           SPHINX="${SPHINX}==${SPHINX_VERSION}";
+          JINJA2="${JINJA2}<3.1";
         fi
-        pip install pytest pytest-cov codecov "${SPHINX}" -e .
+        pip install pytest pytest-cov codecov "${SPHINX}" "${JINJA2}" 
beautifulsoup4 -e .
     - name: Test with pytest
       run: |
         pytest --cov=autodocsumm --cov-report=xml tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autodocsumm-0.2.6/README.rst 
new/autodocsumm-0.2.8/README.rst
--- old/autodocsumm-0.2.6/README.rst    2021-06-28 20:34:58.000000000 +0200
+++ new/autodocsumm-0.2.8/README.rst    2022-04-19 13:20:18.000000000 +0200
@@ -90,7 +90,7 @@
 versions higher than 1.3.
 
 
-.. _Sphinx: http://www.sphinx-doc.org/en/stable
+.. _Sphinx: http://www.sphinx-doc.org/en/master
 
 
 Quickstart
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autodocsumm-0.2.6/autodocsumm/__init__.py 
new/autodocsumm-0.2.8/autodocsumm/__init__.py
--- old/autodocsumm-0.2.6/autodocsumm/__init__.py       2021-06-28 
20:34:58.000000000 +0200
+++ new/autodocsumm-0.2.8/autodocsumm/__init__.py       2022-04-19 
13:20:18.000000000 +0200
@@ -39,7 +39,7 @@
 
 __status__ = "Production"
 
-__version__ = '0.2.6'
+__version__ = '0.2.8'
 
 from itertools import chain
 
@@ -279,8 +279,15 @@
         self.options.update(options_save)
         return documenters
 
-    def add_autosummary(self):
-        """Add the autosammary table of this documenter."""
+    def add_autosummary(self, relative_ref_paths=False):
+        """Add the autosammary table of this documenter.
+
+        Parameters
+        ==========
+        relative_ref_paths: bool
+            Use paths relative to the current module instead of
+            absolute import paths for each object
+        """
         if (
             self.options.get("autosummary")
             and not self.options.get("no-autosummary")
@@ -303,8 +310,14 @@
                 indent = '    '
 
                 for (documenter, _) in documenters:
-                    self.add_line(
-                        indent + '~' + documenter.fullname, sourcename)
+                    obj_ref_path = documenter.fullname
+                    if relative_ref_paths:
+                        modname = self.modname + "."
+                        if documenter.fullname.startswith(modname):
+                            obj_ref_path = documenter.fullname[len(modname):]
+
+                    self.add_line(indent + '~' + obj_ref_path, sourcename)
+
                 self.add_line('', sourcename)
 
 
@@ -351,7 +364,7 @@
     def add_content(self, *args, **kwargs):
         super().add_content(*args, **kwargs)
 
-        self.add_autosummary()
+        self.add_autosummary(relative_ref_paths=True)
 
         if self.options.get("autosummary-no-nesting"):
             self.options["no-autosummary"] = "True"
@@ -400,7 +413,7 @@
     def add_content(self, *args, **kwargs):
         super().add_content(*args, **kwargs)
 
-        self.add_autosummary()
+        self.add_autosummary(relative_ref_paths=True)
 
 
 class CallableDataDocumenter(DataDocumenter):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autodocsumm-0.2.6/setup.py 
new/autodocsumm-0.2.8/setup.py
--- old/autodocsumm-0.2.6/setup.py      2021-06-28 20:34:58.000000000 +0200
+++ new/autodocsumm-0.2.8/setup.py      2022-04-19 13:20:18.000000000 +0200
@@ -11,7 +11,7 @@
 
 
 setup(name='autodocsumm',
-      version='0.2.6',
+      version='0.2.8',
       description='Extended sphinx autodoc including automatic autosummaries',
       long_description=readme(),
       long_description_content_type='text/x-rst',
@@ -36,7 +36,7 @@
       license="Apache-2.0",
       packages=find_packages(exclude=['docs', 'tests*', 'examples']),
       install_requires=[
-          'Sphinx>=2.2',
+          'Sphinx>=2.2,<5.0',
       ],
       setup_requires=pytest_runner,
       tests_require=['pytest'],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/autodocsumm-0.2.6/tests/test-root/dummy_submodule/submodule1.py 
new/autodocsumm-0.2.8/tests/test-root/dummy_submodule/submodule1.py
--- old/autodocsumm-0.2.6/tests/test-root/dummy_submodule/submodule1.py 
1970-01-01 01:00:00.000000000 +0100
+++ new/autodocsumm-0.2.8/tests/test-root/dummy_submodule/submodule1.py 
2022-04-19 13:20:18.000000000 +0200
@@ -0,0 +1,9 @@
+import dummy_submodule.submodule2
+
+
+class SubmoduleClass1:
+    """Docu for myclass 1"""
+
+    def func1(self):
+        """Docu for func 1"""
+        pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/autodocsumm-0.2.6/tests/test-root/dummy_submodule/submodule2.py 
new/autodocsumm-0.2.8/tests/test-root/dummy_submodule/submodule2.py
--- old/autodocsumm-0.2.6/tests/test-root/dummy_submodule/submodule2.py 
1970-01-01 01:00:00.000000000 +0100
+++ new/autodocsumm-0.2.8/tests/test-root/dummy_submodule/submodule2.py 
2022-04-19 13:20:18.000000000 +0200
@@ -0,0 +1,9 @@
+import dummy_submodule.submodule1
+
+
+class SubmoduleClass2:
+    """Docu for myclass 1"""
+
+    def func2(self):
+        """Docu for func 1"""
+        pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autodocsumm-0.2.6/tests/test-root/index.rst 
new/autodocsumm-0.2.8/tests/test-root/index.rst
--- old/autodocsumm-0.2.6/tests/test-root/index.rst     2021-06-28 
20:34:58.000000000 +0200
+++ new/autodocsumm-0.2.8/tests/test-root/index.rst     2022-04-19 
13:20:18.000000000 +0200
@@ -17,3 +17,5 @@
     test_automodulesumm
     test_automodulesumm_some_sections
     test_empty
+    test_class_submodule
+    test_module_submodule
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/autodocsumm-0.2.6/tests/test-root/test_class_submodule.rst 
new/autodocsumm-0.2.8/tests/test-root/test_class_submodule.rst
--- old/autodocsumm-0.2.6/tests/test-root/test_class_submodule.rst      
1970-01-01 01:00:00.000000000 +0100
+++ new/autodocsumm-0.2.8/tests/test-root/test_class_submodule.rst      
2022-04-19 13:20:18.000000000 +0200
@@ -0,0 +1,4 @@
+Test if links in summary are correctly generated
+================================================
+
+.. autoclass:: dummy_submodule.submodule1.SubmoduleClass1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/autodocsumm-0.2.6/tests/test-root/test_module_submodule.rst 
new/autodocsumm-0.2.8/tests/test-root/test_module_submodule.rst
--- old/autodocsumm-0.2.6/tests/test-root/test_module_submodule.rst     
1970-01-01 01:00:00.000000000 +0100
+++ new/autodocsumm-0.2.8/tests/test-root/test_module_submodule.rst     
2022-04-19 13:20:18.000000000 +0200
@@ -0,0 +1,4 @@
+Test if links in summary are correctly generated
+================================================
+
+.. automodule:: dummy_submodule.submodule2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autodocsumm-0.2.6/tests/test_autodocsumm.py 
new/autodocsumm-0.2.8/tests/test_autodocsumm.py
--- old/autodocsumm-0.2.6/tests/test_autodocsumm.py     2021-06-28 
20:34:58.000000000 +0200
+++ new/autodocsumm-0.2.8/tests/test_autodocsumm.py     2022-04-19 
13:20:18.000000000 +0200
@@ -18,6 +18,7 @@
 limitations under the License.
 """
 import re
+import bs4
 import pytest
 import sphinx
 
@@ -39,22 +40,34 @@
         return f.read()
 
 
+def in_autosummary(what, html) -> bool:
+    soup = bs4.BeautifulSoup(html)
+    autosummaries = soup("table")
+    found = False
+    for tag in autosummaries:
+        if tag.find_all("span", string=what):
+            found = True
+            break
+    return found
+
+
 class TestAutosummaryDocumenter:
+
     def test_module(self, app):
         app.build()
         html = get_html(app, 'test_module.html')
-        assert '<span class="pre">TestClass</span>' in html
-        assert '<span class="pre">test_func</span>' in html
-        assert '<span class="pre">test_method</span>' in html
-        assert '<span class="pre">test_attr</span>' in html
+        assert in_autosummary("TestClass", html)
+        assert in_autosummary("test_func", html)
+        assert in_autosummary("test_method", html)
+        assert in_autosummary("test_attr", html)
 
         # test whether the right objects are included
-        assert '<span class="pre">class_caller</span>' in html
+        assert in_autosummary("class_caller", html)
         assert 'Caller docstring for class attribute' in html
 
         # test whether the data is shown correctly
-        assert '<span class="pre">large_data</span>' in html
-        assert '<span class="pre">small_data</span>' in html
+        assert in_autosummary("large_data", html)
+        assert in_autosummary("small_data", html)
 
         try:
             assert 'Should be included' in html
@@ -94,26 +107,17 @@
         app.build()
         html = get_html(app, 'test_module_no_nesting.html')
 
-        assert '<span class="pre">TestClass</span>' in html
-        assert '<span class="pre">test_func</span>' in html
+        assert in_autosummary("TestClass", html)
+        assert in_autosummary("test_func", html)
 
         # test whether the data is shown correctly
-        assert '<span class="pre">large_data</span>' in html
-        assert '<span class="pre">small_data</span>' in html
+        assert in_autosummary("large_data", html)
+        assert in_autosummary("small_data", html)
 
-        # test that elements of TestClass are not autosummarized, since 
nesting is disabled.
-        try:
-            assert '<span class="pre">test_method</span>' not in html
-            assert '<span class="pre">test_attr</span>' not in html
-        except AssertionError:  # sphinx>=3.5
-            found_methods = re.findall(
-                '<span class="pre">test_method</span>', html
-            )
-            assert len(found_methods) == 1
-            found_attrs = re.findall(
-                '<span class="pre">test_attr</span>', html
-            )
-            assert len(found_attrs) == 1
+        # test that elements of TestClass are not autosummarized,
+        # since nesting is disabled.
+        assert not in_autosummary("test_method", html)
+        assert not in_autosummary("test_attr", html)
 
         # test the members are still displayed
         assert re.search(
@@ -124,12 +128,12 @@
     def test_module_summary_only(self, app):
         app.build()
         html = get_html(app, 'test_module_summary_only.html')
-        assert '<span class="pre">TestClass</span>' in html
-        assert '<span class="pre">test_func</span>' in html
+        assert in_autosummary("TestClass", html)
+        assert in_autosummary("test_func", html)
 
         # test whether the data is shown correctly
-        assert '<span class="pre">large_data</span>' in html
-        assert '<span class="pre">small_data</span>' in html
+        assert in_autosummary("large_data", html)
+        assert in_autosummary("small_data", html)
 
         assert not re.search(
             r'<dt( class=".*")? id="dummy.Class_CallTest"( class=".*")*>',
@@ -139,18 +143,18 @@
     def test_module_with_title(self, app):
         app.build()
         html = get_html(app, 'test_module_title.html')
-        assert '<span class="pre">TestClass</span>' in html
-        assert '<span class="pre">test_func</span>' in html
-        assert '<span class="pre">test_method</span>' in html
-        assert '<span class="pre">test_attr</span>' in html
+        assert in_autosummary("TestClass", html)
+        assert in_autosummary("test_func", html)
+        assert in_autosummary("test_method", html)
+        assert in_autosummary("test_attr", html)
 
         # test whether the right objects are included
-        assert '<span class="pre">class_caller</span>' in html
+        assert in_autosummary("class_caller", html)
         assert 'Caller docstring for class attribute' in html
 
         # test whether the data is shown correctly
-        assert '<span class="pre">large_data</span>' in html
-        assert '<span class="pre">small_data</span>' in html
+        assert in_autosummary("large_data", html)
+        assert in_autosummary("small_data", html)
         try:
             assert 'Should be included' in  html
         except AssertionError: # sphinx>=3.5
@@ -188,12 +192,12 @@
         app.build()
 
         html = get_html(app, 'test_module_nosignatures.html')
-        assert '<span class="pre">TestClass</span>' in html
-        assert '<span class="pre">test_func</span>' in html
+        assert in_autosummary("TestClass", html)
+        assert in_autosummary("test_func", html)
 
         # test whether the data is shown correctly
-        assert '<span class="pre">large_data</span>' in html
-        assert '<span class="pre">small_data</span>' in html
+        assert in_autosummary("large_data", html)
+        assert in_autosummary("small_data", html)
 
         assert not re.search(
             r'<dt( class=".*")? id="dummy.Class_CallTest"( class=".*")*>',
@@ -206,15 +210,12 @@
         html = get_html(app, '/test_class.html')
 
         if sphinx_version[:2] > [3, 1]:
-            assert '<span class="pre">instance_attribute</span>' in html
+            assert in_autosummary("instance_attribute", html)
         elif sphinx_version[:2] < [3, 1]:
-            assert (
-                '<span class="pre">dummy.TestClass.instance_attribute</span>'
-                in html
-            )
+            assert in_autosummary("TestClass.instance_attribute", html)
 
-        assert '<span class="pre">test_method</span>' in html
-        assert '<span class="pre">test_attr</span>' in html
+        assert in_autosummary("test_method", html)
+        assert in_autosummary("test_attr", html)
 
         # test escaping of *
         assert r'\*args' not in html
@@ -223,12 +224,12 @@
         assert '**kwargs' in html
 
         # test whether the right objects are included
-        assert '<span class="pre">class_caller</span>' in html
+        assert in_autosummary("class_caller", html)
         assert 'Caller docstring for class attribute' in html
 
         # test whether the data is shown correctly
-        assert '<span class="pre">large_data</span>' in html
-        assert '<span class="pre">small_data</span>' in html
+        assert in_autosummary("large_data", html)
+        assert in_autosummary("small_data", html)
 
         assert 'Should be skipped' not in html
         try:
@@ -261,15 +262,12 @@
         html = get_html(app, '/test_class_order.html')
 
         if sphinx_version[:2] > [3, 1]:
-            assert '<span class="pre">instance_attribute</span>' in html
+            assert in_autosummary("instance_attribute", html)
         elif sphinx_version[:2] < [3, 1]:
-            assert (
-                '<span class="pre">dummy.TestClass.instance_attribute</span>'
-                in html
-            )
+            assert in_autosummary("TestClass.instance_attribute", html)
 
-        assert '<span class="pre">test_attr</span>' in html
-        assert '<span class="pre">large_data</span>' in html
+        assert in_autosummary("test_attr", html)
+        assert in_autosummary("large_data", html)
 
         assert (
             html.index('<span class="pre">test_attr</span>')
@@ -281,22 +279,19 @@
         html = get_html(app, '/test_class_summary_only.html')
 
         if sphinx_version[:2] > [3, 1]:
-            assert '<span class="pre">instance_attribute</span>' in html
+            assert in_autosummary("instance_attribute", html)
         elif sphinx_version[:2] < [3, 1]:
-            assert (
-                '<span class="pre">dummy.TestClass.instance_attribute</span>'
-                in html
-            )
+            assert in_autosummary("TestClass.instance_attribute", html)
 
-        assert '<span class="pre">test_method</span>' in html
-        assert '<span class="pre">test_attr</span>' in html
+        assert in_autosummary("test_method", html)
+        assert in_autosummary("test_attr", html)
 
         # test whether the right objects are included
-        assert '<span class="pre">class_caller</span>' in html
+        assert in_autosummary("class_caller", html)
 
         # test whether the data is shown correctly
-        assert '<span class="pre">large_data</span>' in html
-        assert '<span class="pre">small_data</span>' in html
+        assert in_autosummary("large_data", html)
+        assert in_autosummary("small_data", html)
 
         assert not re.search(
             r'<dt( class=".*")? id="dummy.TestClass.small_data"( 
class=".*")*>',
@@ -308,22 +303,19 @@
         html = get_html(app, '/test_class_nosignatures.html')
 
         if sphinx_version[:2] > [3, 1]:
-            assert '<span class="pre">instance_attribute</span>' in html
+            assert in_autosummary("instance_attribute", html)
         elif sphinx_version[:2] < [3, 1]:
-            assert (
-                '<span class="pre">dummy.TestClass.instance_attribute</span>'
-                in html
-            )
+            assert in_autosummary("TestClass.instance_attribute", html)
 
-        assert '<span class="pre">test_method</span>' in html
-        assert '<span class="pre">test_attr</span>' in html
+        assert in_autosummary("test_method", html)
+        assert in_autosummary("test_attr", html)
 
         # test whether the right objects are included
-        assert '<span class="pre">class_caller</span>' in html
+        assert in_autosummary("class_caller", html)
 
         # test whether the data is shown correctly
-        assert '<span class="pre">large_data</span>' in html
-        assert '<span class="pre">small_data</span>' in html
+        assert in_autosummary("large_data", html)
+        assert in_autosummary("small_data", html)
 
         assert not re.search(
             r'<dt( class=".*")? id="dummy.TestClass.small_data"( 
class=".*")*>',
@@ -335,7 +327,7 @@
     def test_inherited(self, app):
         app.build()
         html = get_html(app, '/test_inherited.html')
-        assert '<span class="pre">test_method</span>' in html
+        assert in_autosummary("test_method", html)
 
     @pytest.mark.xfail
     def test_warnings_depreciation(self, app):
@@ -362,6 +354,28 @@
 
         assert docstring_end > methods_start
 
+    def test_class_submodule(self, app):
+        app.build()
+
+        html = get_html(app, '/test_class_submodule.html')
+
+        # check that hyperlink for instance method exists in summary table
+        assert re.findall(r'<td>.*href="#dummy_submodule\.submodule1'
+                          r'\.SubmoduleClass1\.func1".*</td>', html)
+
+    def test_module_submodule(self, app):
+        app.build()
+
+        html = get_html(app, '/test_module_submodule.html')
+
+        # check that hyperlink for class exists in summary table
+        assert re.findall(r'<td>.*href="#dummy_submodule\.submodule2'
+                          r'\.SubmoduleClass2".*</td>', html)
+
+        # check that hyperlink for instance method exists in summary table
+        assert re.findall(r'<td>.*href="#dummy_submodule\.submodule2'
+                          r'\.SubmoduleClass2\.func2".*</td>', html)
+
 
 class TestAutoDocSummDirective:
     """Test case for the :class:`autodocsumm.AutoDocSummDirective`."""
@@ -376,8 +390,8 @@
         assert "Class test for autosummary" not in html
 
         # test if the methods and attributes are there in a table
-        assert '<span class="pre">test_method</span>' in html
-        assert '<span class="pre">test_attr</span>' in html
+        assert in_autosummary("test_method", html)
+        assert in_autosummary("test_attr", html)
 
     def test_autoclasssumm_no_titles(self, app):
         """Test building the autosummary of a class."""
@@ -389,8 +403,8 @@
         assert "Class test for autosummary" not in html
 
         # test if the methods and attributes are there in a table
-        assert '<span class="pre">test_method</span>' in html
-        assert '<span class="pre">test_attr</span>' in html
+        assert in_autosummary("test_method", html)
+        assert in_autosummary("test_attr", html)
 
         assert "<strong>Methods</strong>" not in html
 
@@ -404,9 +418,9 @@
         assert "Class test for autosummary" not in html
 
         # test if the methods and attributes are there in a table
-        assert '<span class="pre">test_method</span>' not in html
-        assert '<span class="pre">class_caller</span>' in html
-        assert '<span class="pre">test_attr</span>' in html
+        assert not in_autosummary("test_method", html)
+        assert in_autosummary("class_caller", html)
+        assert in_autosummary("test_attr", html)
 
     def test_autoclasssumm_nosignatures(self, app):
         """Test building the autosummary of a class without signatures."""
@@ -418,8 +432,8 @@
         assert "Class test for autosummary" not in html
 
         # test if the methods and attributes are there in a table
-        assert '<span class="pre">test_method</span>' in html
-        assert '<span class="pre">test_attr</span>' in html
+        assert in_autosummary("test_method", html)
+        assert in_autosummary("test_attr", html)
 
         assert '()' not in html
 
@@ -433,9 +447,9 @@
         assert "Module for testing the autodocsumm" not in html
 
         # test if the classes, data and functions are there in a table
-        assert '<span class="pre">Class_CallTest</span>' in html
-        assert '<span class="pre">large_data</span>' in html
-        assert '<span class="pre">test_func</span>' in html
+        assert in_autosummary("Class_CallTest", html)
+        assert in_autosummary("large_data", html)
+        assert in_autosummary("test_func", html)
 
     def test_automodulesumm_some_sections(self, app):
         """Test building the autosummary of a module with some sections 
only."""
@@ -447,9 +461,9 @@
         assert "Module for testing the autodocsumm" not in html
 
         # test if the classes, data and functions are there in a table
-        assert '<span class="pre">Class_CallTest</span>' not in html
-        assert '<span class="pre">large_data</span>' in html
-        assert '<span class="pre">test_func</span>' in html
+        assert not in_autosummary("Class_CallTest", html)
+        assert in_autosummary("large_data", html)
+        assert in_autosummary("test_func", html)
 
     def test_automodulesumm_nosignatures(self, app):
         """Test building the autosummary of a module without signatures."""
@@ -461,9 +475,9 @@
         assert "Module for testing the autodocsumm" not in html
 
         # test if the classes, data and functions are there in a table
-        assert '<span class="pre">Class_CallTest</span>' in html
-        assert '<span class="pre">large_data</span>' in html
-        assert '<span class="pre">test_func</span>' in html
+        assert in_autosummary("Class_CallTest", html)
+        assert in_autosummary("large_data", html)
+        assert in_autosummary("test_func", html)
 
         assert '()' not in html
 
@@ -472,4 +486,4 @@
 
         html = get_html(app, '/test_empty.html')
 
-        assert '<span class="pre">product</span>' not in html
+        assert not in_autosummary("product", html)

Reply via email to