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

1.1.2: is sphinxcontrib-trio not sphinx 4.0.2 ready? #278

Closed
kloczek opened this issue Jun 18, 2021 · 8 comments
Closed

1.1.2: is sphinxcontrib-trio not sphinx 4.0.2 ready? #278

kloczek opened this issue Jun 18, 2021 · 8 comments

Comments

@kloczek
Copy link

kloczek commented Jun 18, 2021

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.0.2
making output directory... done

Exception occurred:
  File "/home/tkloczko/rpmbuild/BUILD/sphinxcontrib-trio-1.1.2/docs/source/conf.py", line 41, in setup
    app.add_stylesheet("hack.css")
AttributeError: 'Sphinx' object has no attribute 'add_stylesheet'
The full traceback has been saved in /tmp/sphinx-err-tzixrvcy.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
[tkloczko@barrel SPECS]$ cat /tmp/sphinx-err-tzixrvcy.log
# Sphinx version: 4.0.2
# Python version: 3.8.9 (CPython)
# Docutils version: 0.16 release
# Jinja2 version: 3.0.1
# Last messages:

# Loaded extensions:
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/setup_command.py", line 169, in run
    app = Sphinx(self.source_dir, self.config_dir,
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 257, in __init__
    self.config.setup(self)
  File "/home/tkloczko/rpmbuild/BUILD/sphinxcontrib-trio-1.1.2/docs/source/conf.py", line 41, in setup
    app.add_stylesheet("hack.css")
AttributeError: 'Sphinx' object has no attribute 'add_stylesheet'
@kloczek
Copy link
Author

kloczek commented Jun 18, 2021

pytest is failng as well

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinxcontrib-trio-1.1.2-6.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinxcontrib-trio-1.1.2-6.fc35.x86_64/usr/lib/python3.8/site-packages
+ PYTHONDONTWRITEBYTECODE=1
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/sphinxcontrib-trio-1.1.2
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, cases-3.6.1, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, Faker-8.8.1
collected 5 items

. .                                                                                                                                                                  [ 25%]
tests/test_sphinxcontrib_trio.py .F.                                                                                                                                 [100%]

================================================================================= FAILURES =================================================================================
_____________________________________________________________________________ test_end_to_end ______________________________________________________________________________

tmpdir = local('/tmp/pytest-of-tkloczko/pytest-131/test_end_to_end0')

    def test_end_to_end(tmpdir):
        shutil.copytree(str(Path(__file__).parent / "test-docs-source"),
                        str(tmpdir / "test-docs-source"))
        subprocess.run(
            ["sphinx-build", "-v", "-nW", "-nb", "html",
             str(tmpdir / "test-docs-source"), str(tmpdir / "out")])

        tree = lxml.html.parse(str(tmpdir / "out" / "test.html")).getroot()

        def do_html_test(node, *, expect_match):
            original_content = node.text_content()
            print("\n-- test case --\n", lxml.html.tostring(node, encoding="unicode"))

            check_tags = node.cssselect(".highlight-none")
            checks = []
            for tag in check_tags:
                text = tag.text_content().strip()
                # lxml normalizes &nbsp to the unicode \xa0, so we do the same
                text = text.replace("&nbsp;", "\xa0")
                checks.append(text)
                tag.drop_tree()

            # make sure we removed the tests from the top-level node, to avoid
            # potential false positives matching on the tests themselves!
            assert len(node.text_content()) < len(original_content)
            assert checks

            test_content = lxml.html.tostring(node, encoding="unicode")
            # some versions of sphinx (>= 1.6) replace "..." with the ellipsis
            # character \u2026. Normalize back to "..." for comparison
            # purposes.
            test_content = test_content.replace("\u2026", "...")
            for check in checks:
                try:
                    if expect_match:
                        assert re.search(check, test_content) is not None
                    else:
                        assert re.search(check, test_content) is None
                except AssertionError:
                    print("failed check")
                    print()
                    print(repr(check))
                    print()
                    print("failed test_content")
                    print()
                    print(repr(test_content))
                    raise

        print("\n-- NEGATIVE (WARNING) TESTS --\n")

        for warning in tree.cssselect(".warning"):
            do_html_test(warning, expect_match=False)

        print("\n-- POSITIVE (NOTE) TESTS --\n")

        for note in tree.cssselect(".note"):
>           do_html_test(note, expect_match=True)

tests/test_sphinxcontrib_trio.py:241:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

node = <Element div at 0x7fa9143577c0>

    def do_html_test(node, *, expect_match):
        original_content = node.text_content()
        print("\n-- test case --\n", lxml.html.tostring(node, encoding="unicode"))

        check_tags = node.cssselect(".highlight-none")
        checks = []
        for tag in check_tags:
            text = tag.text_content().strip()
            # lxml normalizes &nbsp to the unicode \xa0, so we do the same
            text = text.replace("&nbsp;", "\xa0")
            checks.append(text)
            tag.drop_tree()

        # make sure we removed the tests from the top-level node, to avoid
        # potential false positives matching on the tests themselves!
        assert len(node.text_content()) < len(original_content)
        assert checks

        test_content = lxml.html.tostring(node, encoding="unicode")
        # some versions of sphinx (>= 1.6) replace "..." with the ellipsis
        # character \u2026. Normalize back to "..." for comparison
        # purposes.
        test_content = test_content.replace("\u2026", "...")
        for check in checks:
            try:
                if expect_match:
>                   assert re.search(check, test_content) is not None
E                   assert None is not None
E                    +  where None = <function search at 0x7fa91c888a60>('<em class="property">await </em><code class="(sig-name )?descname">foo</code>', '<div class="admonition note">\n<p class="admonition-title">Note</p>\n<dl class="py function">\n<dt class="sig sig-obj... class="n"><span class="pre">bar</span></span></em><span class="sig-paren">)</span></dt>\n<dd></dd></dl>\n\n\n</div>\n')
E                    +    where <function search at 0x7fa91c888a60> = re.search

tests/test_sphinxcontrib_trio.py:220: AssertionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
Running Sphinx v4.0.2
making output directory... done
[autosummary] generating autosummary for: test.rst
[autosummary] generating autosummary for: /tmp/pytest-of-tkloczko/pytest-131/test_end_to_end0/test-docs-source/autodoc_examples.autosummary_me.rst
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [ 50%] autodoc_examples.autosummary_me
reading sources... [100%] test

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 50%] autodoc_examples.autosummary_me
writing output... [100%] test

generating indices... genindex py-modindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-131/test_end_to_end0/out.

-- NEGATIVE (WARNING) TESTS --


-- test case --
 <div class="admonition warning">
<p class="admonition-title">Warning</p>
<dl class="py function">
<dt class="sig sig-object py">
<span class="sig-name descname"><span class="pre">foo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bar</span></span></em><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;em class="property"&gt;await &lt;/em&gt;&lt;code class="(sig-name )?descname"&gt;foo&lt;/code&gt;
</pre></div>
</div>
</div>


-- test case --
 <div class="admonition warning">
<p class="admonition-title">Warning</p>
<dl class="py function">
<dt class="sig sig-object py">
<span class="sig-prename descclassname"><span class="pre">autodoc_examples.</span></span><span class="sig-name descname"><span class="pre">basic</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;/em&gt;&lt;code class="(sig-name )?descname"&gt;basic&lt;/code&gt;
</pre></div>
</div>
</div>


-- test case --
 <div class="admonition warning">
<p class="admonition-title">Warning</p>
<dl class="py class">
<dt class="sig sig-object py">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">autodoc_examples.</span></span><span class="sig-name descname"><span class="pre">ExampleInheritedSubclass</span></span></dt>
<dd><dl class="py method">
<dt class="sig sig-object py">
<span class="sig-name descname"><span class="pre">a_syncmethod</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py">
<span class="sig-name descname"><span class="pre">b_syncmethod</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py">
<em class="property"><span class="pre">await</span> </em><span class="sig-name descname"><span class="pre">c_asyncmethod</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py">
<em class="property"><span class="pre">await</span> </em><span class="sig-name descname"><span class="pre">d_asyncmethod</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd></dd></dl>

</dd></dl>

<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;em class="property"&gt;await &lt;/em&gt;&lt;code class="(sig-name )?descname"&gt;a_syncmethod&lt;/code&gt;
</pre></div>
</div>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;em class="property"&gt;await &lt;/em&gt;&lt;code class="(sig-name )?descname"&gt;b_syncmethod&lt;/code&gt;
</pre></div>
</div>
</div>


-- test case --
 <div class="admonition warning">
<p class="admonition-title">Warning</p>
<dl class="py function">
<dt class="sig sig-object py">
<span class="sig-prename descclassname"><span class="pre">autodoc_examples.</span></span><span class="sig-name descname"><span class="pre">gen</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>for
</pre></div>
</div>
</div>


-- POSITIVE (NOTE) TESTS --


-- test case --
 <div class="admonition note">
<p class="admonition-title">Note</p>
<dl class="py function">
<dt class="sig sig-object py">
<em class="property"><span class="pre">await</span> </em><span class="sig-name descname"><span class="pre">foo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bar</span></span></em><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;em class="property"&gt;await &lt;/em&gt;&lt;code class="(sig-name )?descname"&gt;foo&lt;/code&gt;
</pre></div>
</div>
</div>

failed check

'<em class="property">await </em><code class="(sig-name )?descname">foo</code>'

failed test_content

'<div class="admonition note">\n<p class="admonition-title">Note</p>\n<dl class="py function">\n<dt class="sig sig-object py">\n<em class="property"><span class="pre">await</span> </em><span class="sig-name descname"><span class="pre">foo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bar</span></span></em><span class="sig-paren">)</span></dt>\n<dd></dd></dl>\n\n\n</div>\n'
========================================================================= short test summary info ==========================================================================
FAILED tests/test_sphinxcontrib_trio.py::test_end_to_end - assert None is not None
======================================================================= 1 failed, 3 passed in 9.88s ========================================================================

@pquentin
Copy link
Member

pquentin commented Jun 20, 2021

It's not indeed, see #279.

We need some help to fix that!

@bigjust
Copy link

bigjust commented Jul 14, 2021

did some digging into this: sphinx-doc/sphinx#7747

looks like add_stylesheet() was changed to app.add_css_file()

@bigjust
Copy link

bigjust commented Jul 14, 2021

just to tie this off, this is has been fixed with: 835bb2b

@pquentin
Copy link
Member

We have other issues it seems: #279

@kloczek
Copy link
Author

kloczek commented Jul 14, 2021

Just tested that commit.

[tkloczko@barrel SPECS]$ rpmbuild -ba --with check python-sphinxcontrib-trio.spec --with failing_tests
warning: Downloading https://pypi.io/packages/source/s/sphinxcontrib-trio/sphinxcontrib-trio-1.1.2.tar.gz to /home/tkloczko/rpmbuild/SOURCES/sphinxcontrib-trio-1.1.2.tar.gz
warning: Downloading https://github.com/python-trio/sphinxcontrib-trio//commit/835bb2b.patch#/python-sphinxcontrib-trio-Replace-call-to-add_stylesheet-with-add_css_file.patch to /home/tkloczko/rpmbuild/SOURCES/python-sphinxcontrib-trio-Replace-call-to-add_stylesheet-with-add_css_file.patch
warning: Macro expanded in comment on line 49: %{_mandir}/man3/*

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.1FuSih
+ umask 022
+ cd /home/tkloczko/rpmbuild/BUILD
+ cd /home/tkloczko/rpmbuild/BUILD
+ rm -rf sphinxcontrib-trio-1.1.2
+ /usr/bin/gzip -dc /home/tkloczko/rpmbuild/SOURCES/sphinxcontrib-trio-1.1.2.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd sphinxcontrib-trio-1.1.2
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-sphinxcontrib-trio-man3_level.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ /usr/bin/cat /home/tkloczko/rpmbuild/SOURCES/python-sphinxcontrib-trio-Replace-call-to-add_stylesheet-with-add_css_file.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
+ RPM_EC=0
++ jobs -p

[..]

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.0.3
making output directory... done
loading intersphinx inventory from http://www.sphinx-doc.org/en/stable/objects.inv...
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
intersphinx inventory has moved: http://www.sphinx-doc.org/en/stable/objects.inv -> https://www.sphinx-doc.org/en/master/objects.inv
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-sphinxcontrib-trio.3 { } done
build succeeded.

So looks like sphinx-build is happy now.

pytest sill is failing

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinxcontrib-trio-1.1.2-6.1.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinxcontrib-trio-1.1.2-6.1.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.11, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/sphinxcontrib-trio-1.1.2
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, Faker-8.10.0
collected 5 items

. .                                                                                                                                                                  [ 25%]
tests/test_sphinxcontrib_trio.py .F.                                                                                                                                 [100%]

================================================================================= FAILURES =================================================================================
_____________________________________________________________________________ test_end_to_end ______________________________________________________________________________

tmpdir = local('/tmp/pytest-of-tkloczko/pytest-83/test_end_to_end0')

    def test_end_to_end(tmpdir):
        shutil.copytree(str(Path(__file__).parent / "test-docs-source"),
                        str(tmpdir / "test-docs-source"))
        subprocess.run(
            ["sphinx-build", "-v", "-nW", "-nb", "html",
             str(tmpdir / "test-docs-source"), str(tmpdir / "out")])

        tree = lxml.html.parse(str(tmpdir / "out" / "test.html")).getroot()

        def do_html_test(node, *, expect_match):
            original_content = node.text_content()
            print("\n-- test case --\n", lxml.html.tostring(node, encoding="unicode"))

            check_tags = node.cssselect(".highlight-none")
            checks = []
            for tag in check_tags:
                text = tag.text_content().strip()
                # lxml normalizes &nbsp to the unicode \xa0, so we do the same
                text = text.replace("&nbsp;", "\xa0")
                checks.append(text)
                tag.drop_tree()

            # make sure we removed the tests from the top-level node, to avoid
            # potential false positives matching on the tests themselves!
            assert len(node.text_content()) < len(original_content)
            assert checks

            test_content = lxml.html.tostring(node, encoding="unicode")
            # some versions of sphinx (>= 1.6) replace "..." with the ellipsis
            # character \u2026. Normalize back to "..." for comparison
            # purposes.
            test_content = test_content.replace("\u2026", "...")
            for check in checks:
                try:
                    if expect_match:
                        assert re.search(check, test_content) is not None
                    else:
                        assert re.search(check, test_content) is None
                except AssertionError:
                    print("failed check")
                    print()
                    print(repr(check))
                    print()
                    print("failed test_content")
                    print()
                    print(repr(test_content))
                    raise

        print("\n-- NEGATIVE (WARNING) TESTS --\n")

        for warning in tree.cssselect(".warning"):
            do_html_test(warning, expect_match=False)

        print("\n-- POSITIVE (NOTE) TESTS --\n")

        for note in tree.cssselect(".note"):
>           do_html_test(note, expect_match=True)

tests/test_sphinxcontrib_trio.py:241:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

node = <Element div at 0x7fe602597770>

    def do_html_test(node, *, expect_match):
        original_content = node.text_content()
        print("\n-- test case --\n", lxml.html.tostring(node, encoding="unicode"))

        check_tags = node.cssselect(".highlight-none")
        checks = []
        for tag in check_tags:
            text = tag.text_content().strip()
            # lxml normalizes &nbsp to the unicode \xa0, so we do the same
            text = text.replace("&nbsp;", "\xa0")
            checks.append(text)
            tag.drop_tree()

        # make sure we removed the tests from the top-level node, to avoid
        # potential false positives matching on the tests themselves!
        assert len(node.text_content()) < len(original_content)
        assert checks

        test_content = lxml.html.tostring(node, encoding="unicode")
        # some versions of sphinx (>= 1.6) replace "..." with the ellipsis
        # character \u2026. Normalize back to "..." for comparison
        # purposes.
        test_content = test_content.replace("\u2026", "...")
        for check in checks:
            try:
                if expect_match:
>                   assert re.search(check, test_content) is not None
E                   assert None is not None
E                    +  where None = <function search at 0x7fe60aa539d0>('<em class="property">await </em><code class="(sig-name )?descname">foo</code>', '<div class="admonition note">\n<p class="admonition-title">Note</p>\n<dl class="py function">\n<dt class="sig sig-obj... class="n"><span class="pre">bar</span></span></em><span class="sig-paren">)</span></dt>\n<dd></dd></dl>\n\n\n</div>\n')
E                    +    where <function search at 0x7fe60aa539d0> = re.search

tests/test_sphinxcontrib_trio.py:220: AssertionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
Running Sphinx v4.0.3
making output directory... done
[autosummary] generating autosummary for: test.rst
[autosummary] generating autosummary for: /tmp/pytest-of-tkloczko/pytest-83/test_end_to_end0/test-docs-source/autodoc_examples.autosummary_me.rst
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [ 50%] autodoc_examples.autosummary_me
reading sources... [100%] test

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 50%] autodoc_examples.autosummary_me
writing output... [100%] test

generating indices... genindex py-modindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-83/test_end_to_end0/out.

-- NEGATIVE (WARNING) TESTS --


-- test case --
 <div class="admonition warning">
<p class="admonition-title">Warning</p>
<dl class="py function">
<dt class="sig sig-object py">
<span class="sig-name descname"><span class="pre">foo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bar</span></span></em><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;em class="property"&gt;await &lt;/em&gt;&lt;code class="(sig-name )?descname"&gt;foo&lt;/code&gt;
</pre></div>
</div>
</div>


-- test case --
 <div class="admonition warning">
<p class="admonition-title">Warning</p>
<dl class="py function">
<dt class="sig sig-object py">
<span class="sig-prename descclassname"><span class="pre">autodoc_examples.</span></span><span class="sig-name descname"><span class="pre">basic</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;/em&gt;&lt;code class="(sig-name )?descname"&gt;basic&lt;/code&gt;
</pre></div>
</div>
</div>


-- test case --
 <div class="admonition warning">
<p class="admonition-title">Warning</p>
<dl class="py class">
<dt class="sig sig-object py">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">autodoc_examples.</span></span><span class="sig-name descname"><span class="pre">ExampleInheritedSubclass</span></span></dt>
<dd><dl class="py method">
<dt class="sig sig-object py">
<span class="sig-name descname"><span class="pre">a_syncmethod</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py">
<span class="sig-name descname"><span class="pre">b_syncmethod</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py">
<em class="property"><span class="pre">await</span> </em><span class="sig-name descname"><span class="pre">c_asyncmethod</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py">
<em class="property"><span class="pre">await</span> </em><span class="sig-name descname"><span class="pre">d_asyncmethod</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd></dd></dl>

</dd></dl>

<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;em class="property"&gt;await &lt;/em&gt;&lt;code class="(sig-name )?descname"&gt;a_syncmethod&lt;/code&gt;
</pre></div>
</div>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;em class="property"&gt;await &lt;/em&gt;&lt;code class="(sig-name )?descname"&gt;b_syncmethod&lt;/code&gt;
</pre></div>
</div>
</div>


-- test case --
 <div class="admonition warning">
<p class="admonition-title">Warning</p>
<dl class="py function">
<dt class="sig sig-object py">
<span class="sig-prename descclassname"><span class="pre">autodoc_examples.</span></span><span class="sig-name descname"><span class="pre">gen</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>for
</pre></div>
</div>
</div>


-- POSITIVE (NOTE) TESTS --


-- test case --
 <div class="admonition note">
<p class="admonition-title">Note</p>
<dl class="py function">
<dt class="sig sig-object py">
<em class="property"><span class="pre">await</span> </em><span class="sig-name descname"><span class="pre">foo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bar</span></span></em><span class="sig-paren">)</span></dt>
<dd></dd></dl>

<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;em class="property"&gt;await &lt;/em&gt;&lt;code class="(sig-name )?descname"&gt;foo&lt;/code&gt;
</pre></div>
</div>
</div>

failed check

'<em class="property">await </em><code class="(sig-name )?descname">foo</code>'

failed test_content

'<div class="admonition note">\n<p class="admonition-title">Note</p>\n<dl class="py function">\n<dt class="sig sig-object py">\n<em class="property"><span class="pre">await</span> </em><span class="sig-name descname"><span class="pre">foo</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">bar</span></span></em><span class="sig-paren">)</span></dt>\n<dd></dd></dl>\n\n\n</div>\n'
========================================================================= short test summary info ==========================================================================
FAILED tests/test_sphinxcontrib_trio.py::test_end_to_end - assert None is not None
======================================================================= 1 failed, 3 passed in 9.64s ========================================================================

but taht is part of another ticket #278 and my understanding it is another story (I'm attacing pytest output just FTR)

Thank you.

@kloczek
Copy link
Author

kloczek commented Dec 27, 2021

With latest pytest test suite fails completely

=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/sphinxcontrib-trio-1.1.2
plugins: cov-3.0.0, timeout-2.0.2, relaxed-1.1.5
collected 0 items / 1 error

================================================================================== ERRORS ==================================================================================
______________________________________________________________________ ERROR collecting test session _______________________________________________________________________
Direct construction of SpecModule has been deprecated, please use SpecModule.from_parent.
See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details.
========================================================================= short test summary info ==========================================================================
ERROR
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================= 1 error in 0.22s =============================================================================

@kloczek
Copy link
Author

kloczek commented Jan 22, 2024

Closing.
This ticket is outdated.

@kloczek kloczek closed this as completed Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants