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

multiple test failures with v41 #302

Open
nieder opened this issue Feb 17, 2024 · 5 comments
Open

multiple test failures with v41 #302

nieder opened this issue Feb 17, 2024 · 5 comments

Comments

@nieder
Copy link

nieder commented Feb 17, 2024

This is macOS with python3.10. Unfortunately, it's for readme-renderer-v41 because I can't update to 42 which needs nh3, which needs rust, which I don't have.

/sw/bin/python3.10 -m pytest -vv || exit 2
========================================================================= test session starts =========================================================================
platform darwin -- Python 3.10.4, pytest-7.4.4, pluggy-1.3.0 -- /sw/bin/python3.10
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/.hypothesis/examples')
rootdir: /sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0
plugins: xprocess-0.23.0, icdiff-0.9, hypothesis-6.42.1, pyfakefs-5.3.4, cov-2.6.1, xdist-3.5.0, timeout-2.2.0
collected 49 items                                                                                                                                                    
Test results
_____________________________________________________________ test_cli_input_file[test_rst_003.rst-False] _____________________________________________________________

input_file = PosixPath('tests/fixtures/test_rst_003.rst'), output_file = False

    @pytest.mark.parametrize("output_file", [False, True])
    def test_cli_input_file(input_file, output_file):
        with mock.patch("builtins.print") as print_:
            if output_file:
                with tempfile.TemporaryDirectory() as tmpdir:
                    output = pathlib.Path(tmpdir) / "output.html"
                    main(["-o", str(output), str(input_file)])
                    with output.open() as fp:
                        result = fp.read()
            else:
                main([str(input_file)])
    
        print_.assert_called_once()
        (result,), kwargs = print_.call_args
    
        with input_file.with_suffix(".html").open() as fp:
            expected = fp.read()
>       assert result.strip() == expected.strip()
E       assert equals failed
E         '<div class="section" id="required-packages">\n<h2>Required packages</h2>\n  '<section id="required-packages">\n<h2>Required packages</h2>\n<p>To run th 
E         <p>To run the PyPI software, you need Python 2.5+ and PostgreSQL</p>\n</div  e PyPI software, you need Python 2.5+ and PostgreSQL</p>\n</section>\n<sect 
E         >\n<div class="section" id="quick-development-setup">\n<h2>Quick developmen  ion id="quick-development-setup">\n<h2>Quick development setup</h2>\n<p>Mak 
E         t setup</h2>\n<p>Make sure you are sitting</p>\n</div>'                      e sure you are sitting</p>\n</section>'

tests/test_cli.py:35: AssertionError
_____________________________________________________________ test_cli_input_file[test_rst_003.rst-True] ______________________________________________________________

input_file = PosixPath('tests/fixtures/test_rst_003.rst'), output_file = True

    @pytest.mark.parametrize("output_file", [False, True])
    def test_cli_input_file(input_file, output_file):
        with mock.patch("builtins.print") as print_:
            if output_file:
                with tempfile.TemporaryDirectory() as tmpdir:
                    output = pathlib.Path(tmpdir) / "output.html"
                    main(["-o", str(output), str(input_file)])
                    with output.open() as fp:
                        result = fp.read()
            else:
                main([str(input_file)])
    
        print_.assert_called_once()
        (result,), kwargs = print_.call_args
    
        with input_file.with_suffix(".html").open() as fp:
            expected = fp.read()
>       assert result.strip() == expected.strip()
E       assert equals failed
E         '<div class="section" id="required-packages">\n<h2>Required packages</h2>\n  '<section id="required-packages">\n<h2>Required packages</h2>\n<p>To run th 
E         <p>To run the PyPI software, you need Python 2.5+ and PostgreSQL</p>\n</div  e PyPI software, you need Python 2.5+ and PostgreSQL</p>\n</section>\n<sect 
E         >\n<div class="section" id="quick-development-setup">\n<h2>Quick developmen  ion id="quick-development-setup">\n<h2>Quick development setup</h2>\n<p>Mak 
E         t setup</h2>\n<p>Make sure you are sitting</p>\n</div>'                      e sure you are sitting</p>\n</section>'

tests/test_cli.py:35: AssertionError
_____________________________________________________________ test_cli_explicit_format[test_rst_003.rst] ______________________________________________________________

input_file = PosixPath('tests/fixtures/test_rst_003.rst')

    def test_cli_explicit_format(input_file):
        fmt = input_file.suffix.lstrip(".")
        with input_file.open() as fp, \
                mock.patch("pathlib.Path.open", return_value=fp), \
                mock.patch("builtins.print") as print_:
            main(["-f", fmt, "no-file.invalid"])
            print_.assert_called_once()
            (result,), _ = print_.call_args
    
        with input_file.with_suffix(".html").open() as fp:
>           assert result.strip() == fp.read().strip()
E           assert equals failed
E             '<div class="section" id="required-packages">\n<h2>Required packages</h2>\n  '<section id="required-packages">\n<h2>Required packages</h2>\n<p>To run th 
E             <p>To run the PyPI software, you need Python 2.5+ and PostgreSQL</p>\n</div  e PyPI software, you need Python 2.5+ and PostgreSQL</p>\n</section>\n<sect 
E             >\n<div class="section" id="quick-development-setup">\n<h2>Quick developmen  ion id="quick-development-setup">\n<h2>Quick development setup</h2>\n<p>Mak 
E             t setup</h2>\n<p>Make sure you are sitting</p>\n</div>'                      e sure you are sitting</p>\n</section>'

tests/test_cli.py:57: AssertionError
________________________________________ test_cli_package[docutils-Docutils is a modular system for processing documentation] _________________________________________

package = 'docutils', contains = 'Docutils is a modular system for processing documentation'

    @pytest.mark.parametrize("package, contains", [
        ("readme_renderer", "Readme Renderer is a library that will safely render"),
        ("docutils", "Docutils is a modular system for processing documentation"),
    ])
    def test_cli_package(package, contains):
        with mock.patch("builtins.print") as print_:
>           main(["-p", package])

tests/test_cli.py:66: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cli_args = ['-p', 'docutils']

    def main(cli_args: Optional[List[str]] = None) -> None:
        parser = argparse.ArgumentParser(
            description="Renders a .md, .rst, or .txt README to HTML",
        )
        parser.add_argument("-p", "--package", help="Get README from package metadata",
                            action="store_true")
        parser.add_argument("-f", "--format", choices=["md", "rst", "txt"],
                            help="README format (inferred from input file name or package)")
        parser.add_argument('input', help="Input README file or package name")
        parser.add_argument('-o', '--output', help="Output file (default: stdout)",
                            type=argparse.FileType('w'), default='-')
        args = parser.parse_args(cli_args)
    
        content_format = args.format
        if args.package:
            message = metadata(args.input)
            source = message.get_payload()  # type: ignore[attr-defined] # noqa: E501 https://peps.python.org/pep-0566/
    
            # Infer the format of the description from package metadata.
            if not content_format:
                content_type = message.get("Description-Content-Type", "text/x-rst")  # type: ignore[attr-defined] # noqa: E501 https://github.com/python/typeshed/issues/10021
                if content_type == "text/x-rst":
                    content_format = "rst"
                elif content_type == "text/markdown":
                    content_format = "md"
                elif content_type == "text/plain":
                    content_format = "txt"
                else:
                    raise ValueError(f"invalid content type {content_type} for package "
                                     "`long_description`")
        else:
            filename = pathlib.Path(args.input)
            content_format = content_format or filename.suffix.lstrip(".")
            with filename.open() as fp:
                source = fp.read()
    
        if content_format == "md":
            rendered = render_md(source, stream=sys.stderr)
        elif content_format == "rst":
            rendered = render_rst(source, stream=sys.stderr)
        elif content_format == "txt":
            rendered = render_txt(source, stream=sys.stderr)
        else:
            raise ValueError(f"invalid README format: {content_format} (expected `md`, "
                             "`rst`, or `txt`)")
        if rendered is None:
>           sys.exit(1)
E           SystemExit: 1

readme_renderer/__main__.py:57: SystemExit
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
No content rendered from RST source.
_______________________________________________________________ test_rst_fixtures[test_rst_tables.rst] ________________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_tables.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_tables.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert equals failed
E             '<table>\n<colgroup>\n<col>\n<col>\n<col>\n<col>\n</colgroup>\n<thead>\n<tr  '<table>\n<thead>\n<tr><th class="head"><p>Header row, column 1\n(header ro 
E             ><th class="head"><p>Header row, column 1\n(header rows optional)</p></th>\  ws optional)</p></th>\n<th class="head"><p>Header 2</p></th>\n<th class="he 
E             n<th class="head"><p>Header 2</p></th>\n<th class="head"><p>Header 3</p></t  ad"><p>Header 3</p></th>\n<th class="head"><p>Header 4</p></th>\n</tr>\n</t 
E             h>\n<th class="head"><p>Header 4</p></th>\n</tr>\n</thead>\n<tbody>\n<tr><t  head>\n<tbody>\n<tr><td><p>body row 1, column 1</p></td>\n<td><p>column 2</ 
E             d><p>body row 1, column 1</p></td>\n<td><p>column 2</p></td>\n<td><p>column  p></td>\n<td><p>column 3</p></td>\n<td><p>column 4</p></td>\n</tr>\n<tr><td 
E              3</p></td>\n<td><p>column 4</p></td>\n</tr>\n<tr><td><p>body row 2</p></td  ><p>body row 2</p></td>\n<td colspan="3"><p>Cells may span columns.</p></td 
E             >\n<td colspan="3"><p>Cells may span columns.</p></td>\n</tr>\n<tr><td><p>b  >\n</tr>\n<tr><td><p>body row 3</p></td>\n<td rowspan="2"><p>Cells may\nspa 
E             ody row 3</p></td>\n<td rowspan="2"><p>Cells may\nspan rows.</p></td>\n<td   n rows.</p></td>\n<td colspan="2" rowspan="2"><ul class="simple">\n<li><p>T 
E             colspan="2" rowspan="2"><ul class="simple">\n<li><p>Table cells</p></li>\n<  able cells</p></li>\n<li><p>contain</p></li>\n<li><p>body elements.</p></li 
E             li><p>contain</p></li>\n<li><p>body elements.</p></li>\n</ul>\n</td>\n</tr>  >\n</ul>\n</td>\n</tr>\n<tr><td><p>body row 4</p></td>\n</tr>\n</tbody>\n</ 
E             \n<tr><td><p>body row 4</p></td>\n</tr>\n</tbody>\n</table>\n<table>\n<colg  table>\n<table>\n<thead>\n<tr><th class="head"><p>title1</p></th>\n<th clas 
E             roup>\n<col>\n<col>\n</colgroup>\n<thead>\n<tr><th class="head"><p>title1</  s="head"><p>title2</p></th>\n</tr>\n</thead>\n<tbody>\n<tr><td><p>col1</p>< 
E             p></th>\n<th class="head"><p>title2</p></th>\n</tr>\n</thead>\n<tbody>\n<tr  /td>\n<td><p>col2</p></td>\n</tr>\n<tr><td rowspan="2"><p>mutirow</p></td>\ 
E             ><td><p>col1</p></td>\n<td><p>col2</p></td>\n</tr>\n<tr><td rowspan="2"><p>  n<td><p>cell1</p></td>\n</tr>\n<tr><td><p>cell2</p></td>\n</tr>\n<tr><td><p 
E             mutirow</p></td>\n<td><p>cell1</p></td>\n</tr>\n<tr><td><p>cell2</p></td>\n  >singlerow</p></td>\n<td><p>cell3</p></td>\n</tr>\n</tbody>\n</table>\n'    
E             </tr>\n<tr><td><p>singlerow</p></td>\n<td><p>cell3</p></td>\n</tr>\n</tbody                                                                              
E             >\n</table>\n'

tests/test_rst.py:28: AssertionError
______________________________________________________________ test_rst_fixtures[test_rst_contents.rst] _______________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_contents.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_contents.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert equals failed
E             '<div class="contents topic" id="contents">\n<p class="topic-title first">C  '<nav class="contents" id="contents">\n<p class="topic-title">Contents</p>\ 
E             ontents</p>\n<ul class="simple">\n<li><p><a href="#features" id="id1" rel="  n<ul class="simple">\n<li><p><a href="#features" id="toc-entry-1" rel="nofo 
E             nofollow">Features</a></p></li>\n<li><p><a href="#installation" id="id2" re  llow">Features</a></p></li>\n<li><p><a href="#installation" id="toc-entry-2 
E             l="nofollow">Installation</a></p></li>\n</ul>\n</div>\n<div class="section"  " rel="nofollow">Installation</a></p></li>\n</ul>\n</nav>\n<section id="fea 
E              id="features">\n<h2><a href="#id1" rel="nofollow">Features</a></h2>\n<ul c  tures">\n<h2><a href="#toc-entry-1" rel="nofollow">Features</a></h2>\n<ul c 
E             lass="simple">\n<li><p>Eats cheese</p></li>\n</ul>\n</div>\n<div class="sec  lass="simple">\n<li><p>Eats cheese</p></li>\n</ul>\n</section>\n<section id 
E             tion" id="installation">\n<h2><a href="#id2" rel="nofollow">Installation</a  ="installation">\n<h2><a href="#toc-entry-2" rel="nofollow">Installation</a 
E             ></h2>\n<p class="section-subtitle" id="requirements">Requirements</p>\n<ul  ></h2>\n<p class="section-subtitle" id="requirements">Requirements</p>\n<ul 
E              class="simple">\n<li><p>Teeth</p></li>\n<li><p>Good taste</p></li>\n</ul>\   class="simple">\n<li><p>Teeth</p></li>\n<li><p>Good taste</p></li>\n</ul>\ 
E             n<p>Let’s eat some cheese together!</p>\n</div>\n'                           n<p>Let’s eat some cheese together!</p>\n</section>\n'

tests/test_rst.py:28: AssertionError
_______________________________________________________________ test_rst_fixtures[test_rst_docinfo.rst] _______________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_docinfo.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_docinfo.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert equals failed
E             '<dl class="docinfo simple">\n<dt class="project">Project</dt>\n<dd class="  '<dl class="docinfo simple">\n<dt class="project">Project<span class="colon 
E             project"><p>pg_query – Pythonic wrapper around libpg_query</p>\n</dd>\n<dt   ">:</span></dt>\n<dd class="project"><p>pg_query – Pythonic wrapper around  
E             class="created">Created</dt>\n<dd class="created"><p>mer 02 ago 2017 14:49:  libpg_query</p>\n</dd>\n<dt class="created">Created<span class="colon">:</s 
E             24 CEST</p>\n</dd>\n<dt class="author">Author</dt>\n<dd class="author"><p>L  pan></dt>\n<dd class="created"><p>mer 02 ago 2017 14:49:24 CEST</p>\n</dd>\ 
E             ele Gaifax &lt;<a href="mailto:lele&#37;&#52;&#48;metapensiero&#46;it">lele  n<dt class="author">Author<span class="colon">:</span></dt>\n<dd class="aut 
E             <span>&#64;</span>metapensiero<span>&#46;</span>it</a>&gt;</p></dd>\n<dt cl  hor"><p>Lele Gaifax &lt;<a href="mailto:lele&#37;&#52;&#48;metapensiero&#46 
E             ass="license">License</dt>\n<dd class="license"><p>GNU General Public Licen  ;it">lele<span>&#64;</span>metapensiero<span>&#46;</span>it</a>&gt;</p></dd 
E             se version 3 or later</p>\n</dd>\n<dt class="copyright">Copyright</dt>\n<dd  >\n<dt class="license">License<span class="colon">:</span></dt>\n<dd class= 
E              class="copyright">© 2017, 2018 Lele Gaifax</dd>\n</dl>\n<div class="sectio  "license"><p>GNU General Public License version 3 or later</p>\n</dd>\n<dt  
E             n" id="pg-query">\n<h2>pg_query</h2>\n</div>\n'                              class="copyright">Copyright<span class="colon">:</span></dt>\n<dd class="co 
E                                                                                          pyright">© 2017, 2018 Lele Gaifax</dd>\n</dl>\n<section id="pg-query">\n<h2 
E                                                                                          >pg_query</h2>\n</section>\n'

tests/test_rst.py:28: AssertionError
_______________________________________________________________ test_rst_fixtures[test_rst_linkify.rst] _______________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_linkify.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_linkify.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert equals failed
E             '<a href="https://travis-ci.org/tulsawebdevs/django-multi-gtfs" rel="nofoll  '<a href="https://travis-ci.org/tulsawebdevs/django-multi-gtfs" rel="nofoll 
E             ow"><img alt="https://travis-ci.org/tulsawebdevs/django-multi-gtfs.svg?bran  ow"><img alt="https://travis-ci.org/tulsawebdevs/django-multi-gtfs.svg?bran 
E             ch=master" src="https://travis-ci.org/tulsawebdevs/django-multi-gtfs.svg?br  ch=master" src="https://travis-ci.org/tulsawebdevs/django-multi-gtfs.svg?br 
E             anch=master"></a>\n<a href="https://coveralls.io/github/tulsawebdevs/django  anch=master"></a>\n<a href="https://coveralls.io/github/tulsawebdevs/django 
E             -multi-gtfs" rel="nofollow"><img alt="https://coveralls.io/repos/github/tul  -multi-gtfs" rel="nofollow"><img alt="https://coveralls.io/repos/github/tul 
E             sawebdevs/django-multi-gtfs/badge.svg?branch=django19" src="https://coveral  sawebdevs/django-multi-gtfs/badge.svg?branch=django19" src="https://coveral 
E             ls.io/repos/github/tulsawebdevs/django-multi-gtfs/badge.svg?branch=django19  ls.io/repos/github/tulsawebdevs/django-multi-gtfs/badge.svg?branch=django19 
E             "></a>\n<p><strong>multigtfs</strong> is an <a href="http://choosealicense.  "></a>\n<p><strong>multigtfs</strong> is an <a href="http://choosealicense. 
E             com/licenses/apache/" rel="nofollow">Apache 2.0</a>-licensed Django app tha  com/licenses/apache/" rel="nofollow">Apache 2.0</a>-licensed Django app tha 
E             t supports importing\nand exporting of GTFS feeds.  All features of the <a   t supports importing\nand exporting of GTFS feeds.  All features of the <a  
E             href="https://developers.google.com/transit/gtfs/reference" rel="nofollow">  href="https://developers.google.com/transit/gtfs/reference" rel="nofollow"> 
E             June 20, 2012 reference</a>\nare supported, including <a href="https://deve  June 20, 2012 reference</a>\nare supported, including <a href="https://deve 
E             lopers.google.com/transit/gtfs/changes#RevisionHistory" rel="nofollow">all   lopers.google.com/transit/gtfs/changes#RevisionHistory" rel="nofollow">all  
E             changes</a> up to February 17, 2014.\nIt allows multiple feeds to be stored  changes</a> up to February 17, 2014.\nIt allows multiple feeds to be stored 
E              in the database at once.</p>\n<p>It requires a spatial databases compatibl   in the database at once.</p>\n<p>It requires a spatial databases compatibl 
E             e with <a href="https://docs.djangoproject.com/en/dev/ref/contrib/gis/" rel  e with <a href="https://docs.djangoproject.com/en/dev/ref/contrib/gis/" rel 
E             ="nofollow">GeoDjango</a>.  <a href="http://www.postgresql.org" rel="nofoll  ="nofollow">GeoDjango</a>.  <a href="http://www.postgresql.org" rel="nofoll 
E             ow">PostgreSQL</a> 9.x\nand <a href="http://postgis.refractions.net" rel="n  ow">PostgreSQL</a> 9.x\nand <a href="http://postgis.refractions.net" rel="n 
E             ofollow">PostGIS</a> 2.x are recommended for development and production, si  ofollow">PostGIS</a> 2.x are recommended for development and production, si 
E             nce these\nsupport all the GeoDjango features.</p>\n<div class="section" id  nce these\nsupport all the GeoDjango features.</p>\n<section id="status">\n 
E             ="status">\n<h2>Status</h2>\n<p>multigtfs is ready for your GTFS project.</  <h2>Status</h2>\n<p>multigtfs is ready for your GTFS project.</p>\n<p>Point 
E             p>\n<p>Point releases (0.4.1 to 0.4.2) should be safe, only adding features   releases (0.4.1 to 0.4.2) should be safe, only adding features or fixing\n 
E              or fixing\nbugs.  Minor updates (0.3.3 to 0.4.0) may include significant c  bugs.  Minor updates (0.3.3 to 0.4.0) may include significant changes that  
E             hanges that will\nbreak relying code.  In the worst case scenario, you may   will\nbreak relying code.  In the worst case scenario, you may need to expo 
E             need to export your\nGTFS feeds in the original version, update multigtfs a  rt your\nGTFS feeds in the original version, update multigtfs and your code 
E             nd your code, and\nre-import.</p>\n<p>multigtfs works with Django 1.5 throu  , and\nre-import.</p>\n<p>multigtfs works with Django 1.5 through 1.9. In t 
E             gh 1.9. In the next version, support\nwill be limited to Django’s supported  he next version, support\nwill be limited to Django’s supported releases, s 
E              releases, so if you are using an old\nversion you will want to update to a  o if you are using an old\nversion you will want to update to at least 1.8, 
E             t least 1.8, the long-term support (LTS)\nrelease.</p>\n<p>All valid GTFS f   the long-term support (LTS)\nrelease.</p>\n<p>All valid GTFS feeds are sup 
E             eeds are supported for import and export.  This includes\nfeeds with extra   ported for import and export.  This includes\nfeeds with extra columns not  
E             columns not yet included in the GTFS spec, and feeds that\nomit <span class  yet included in the GTFS spec, and feeds that\nomit <span class="docutils l 
E             ="docutils literal">calendar.txt</span> in favor of <span class="docutils l  iteral">calendar.txt</span> in favor of <span class="docutils literal">cale 
E             iteral">calendar_dates.txt</span> (such as the TriMet\narchive feeds).  If   ndar_dates.txt</span> (such as the TriMet\narchive feeds).  If you find a f 
E             you find a feed that doesn’t work, <a href="/tulsawebdevs  eed that doesn’t work, <a href="/tulsawebdevs/django-mult 
E             /django-multi-gtfs/issues" rel="nofollow">file a bug</a>!</p>\n<p>See the <  i-gtfs/issues" rel="nofollow">file a bug</a>!</p>\n<p>See the <a href="http 
E             a href="/tulsawebdevs/django-multi-gtfs/issues?state=open  s://github.com/tulsawebdevs/django-multi-gtfs/issues?state=open" rel="nofol 
E             " rel="nofollow">issues list</a> for more details on bugs and feature reque  low">issues list</a> for more details on bugs and feature requests.</p>\n</ 
E             sts.</p>\n</div>\n<div class="section" id="example-project">\n<h2>Example p  section>\n<section id="example-project">\n<h2>Example project</h2>\n<p>Chec 
E             roject</h2>\n<p>Check out the <a href="examples/explore/README.md" rel="nof  k out the <a href="examples/explore/README.md" rel="nofollow">example proje 
E             ollow">example project</a>.</p>\n</div>\n<div class="section" id="developme  ct</a>.</p>\n</section>\n<section id="development">\n<h2>Development</h2>\n 
E             nt">\n<h2>Development</h2>\n<dl class="field-list simple">\n<dt>Code</dt>\n  <dl class="field-list simple">\n<dt>Code<span class="colon">:</span></dt>\n 
E             <dd><p><a href="/tulsawebdevs/django-multi-gtfs" rel="nof  <dd><p><a href="/tulsawebdevs/django-multi-gtfs" rel="nof 
E             ollow">https://github.com/tulsawebdevs/django-multi-gtfs</a></p>\n</dd>\n<d  ollow">https://github.com/tulsawebdevs/django-multi-gtfs</a></p>\n</dd>\n<d 
E             t>Issues</dt>\n<dd><p><a href="/tulsawebdevs/django-multi  t>Issues<span class="colon">:</span></dt>\n<dd><p><a href="https://github.c 
E             -gtfs/issues" rel="nofollow">https://github.com/tulsawebdevs/django-multi-g  om/tulsawebdevs/django-multi-gtfs/issues" rel="nofollow">https://github.com 
E             tfs/issues</a></p>\n</dd>\n<dt>Dev Docs</dt>\n<dd><p><a href="http://multig  /tulsawebdevs/django-multi-gtfs/issues</a></p>\n</dd>\n<dt>Dev Docs<span cl 
E             tfs.readthedocs.org/" rel="nofollow">http://multigtfs.readthedocs.org/</a><  ass="colon">:</span></dt>\n<dd><p><a href="http://multigtfs.readthedocs.org 
E             /p>\n</dd>\n<dt>IRC</dt>\n<dd><p><a>irc://irc.freenode.net/tulsawebdevs</a>  /" rel="nofollow">http://multigtfs.readthedocs.org/</a></p>\n</dd>\n<dt>IRC 
E             </p>\n</dd>\n</dl>\n</div>\n'                                                <span class="colon">:</span></dt>\n<dd><p><a>irc://irc.freenode.net/tulsawe 
E                                                                                          bdevs</a></p>\n</dd>\n</dl>\n</section>\n'

tests/test_rst.py:28: AssertionError
_______________________________________________________________ test_rst_fixtures[test_rst_bibtex.rst] ________________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_bibtex.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_bibtex.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert equals failed
E             '<pre><code><span class="nc">&#64;article</span><span class="p">{</span><sp  '<pre><code><span class="nc">&#64;article</span><span class="p">{</span><sp 
E             an class="nl">the_impact_of_pygments_docutils_config_and_html5</span><span   an class="nl">the_impact_of_pygments_docutils_config_and_html5</span><span  
E             class="p">,</span><span class="w">\n  </span><span class="na">year</span><s  class="p">,</span><span class="w">\n  </span><span class="na">year</span><s 
E             pan class="w"> </span><span class="p">=</span><span class="w"> </span><span  pan class="w"> </span><span class="p">=</span><span class="w"> </span><s>{2 
E              class="s">{2022}</span><span class="p">,</span></code></pre>\n'             022}</s><span class="p">,</span></code></pre>\n'

tests/test_rst.py:28: AssertionError
_______________________________________________________________ test_rst_fixtures[test_rst_caption.rst] _______________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_caption.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_caption.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert equals failed
E             '<table>\n<caption>Multiplication</caption>\n<colgroup>\n<col>\n<col>\n<col  '<table>\n<caption>Multiplication</caption>\n<thead>\n<tr><th class="head"> 
E             >\n<col>\n<col>\n</colgroup>\n<thead>\n<tr><th class="head"><p>1</p></th>\n  <p>1</p></th>\n<th class="head"><p>2</p></th>\n<th class="head"><p>3</p></t 
E             <th class="head"><p>2</p></th>\n<th class="head"><p>3</p></th>\n<th class="  h>\n<th class="head"><p>4</p></th>\n<th class="head"><p>5</p></th>\n</tr>\n 
E             head"><p>4</p></th>\n<th class="head"><p>5</p></th>\n</tr>\n</thead>\n<tbod  </thead>\n<tbody>\n<tr><td><p>1</p></td>\n<td><p>2</p></td>\n<td><p>3</p></ 
E             y>\n<tr><td><p>1</p></td>\n<td><p>2</p></td>\n<td><p>3</p></td>\n<td><p>4</  td>\n<td><p>4</p></td>\n<td><p>5</p></td>\n</tr>\n<tr><td><p>2</p></td>\n<t 
E             p></td>\n<td><p>5</p></td>\n</tr>\n<tr><td><p>2</p></td>\n<td><p>4</p></td>  d><p>4</p></td>\n<td><p>6</p></td>\n<td><p>8</p></td>\n<td><p>10</p></td>\n 
E             \n<td><p>6</p></td>\n<td><p>8</p></td>\n<td><p>10</p></td>\n</tr>\n<tr><td>  </tr>\n<tr><td><p>3</p></td>\n<td><p>6</p></td>\n<td><p>9</p></td>\n<td><p> 
E             <p>3</p></td>\n<td><p>6</p></td>\n<td><p>9</p></td>\n<td><p>12</p></td>\n<t  12</p></td>\n<td><p>15</p></td>\n</tr>\n<tr><td><p>4</p></td>\n<td><p>8</p> 
E             d><p>15</p></td>\n</tr>\n<tr><td><p>4</p></td>\n<td><p>8</p></td>\n<td><p>1  </td>\n<td><p>12</p></td>\n<td><p>16</p></td>\n<td><p>20</p></td>\n</tr>\n< 
E             2</p></td>\n<td><p>16</p></td>\n<td><p>20</p></td>\n</tr>\n<tr><td><p>5</p>  tr><td><p>5</p></td>\n<td><p>10</p></td>\n<td><p>15</p></td>\n<td><p>20</p> 
E             </td>\n<td><p>10</p></td>\n<td><p>15</p></td>\n<td><p>20</p></td>\n<td><p>2  </td>\n<td><p>25</p></td>\n</tr>\n</tbody>\n</table>\n'                     
E             5</p></td>\n</tr>\n</tbody>\n</table>\n'

tests/test_rst.py:28: AssertionError
_______________________________________________________________ test_rst_fixtures[test_rst_figure.rst] ________________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_figure.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_figure.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert equals failed
E             '<div class="figure align-center">\n<img alt="https://raw.githubusercontent  '<figure class="align-center">\n<img alt="https://raw.githubusercontent.com 
E             .com/schlatterbeck/plot-antenna/master/test/12-el-azimuth.png" src="https:/  /schlatterbeck/plot-antenna/master/test/12-el-azimuth.png" src="https://raw 
E             /raw.githubusercontent.com/schlatterbeck/plot-antenna/master/test/12-el-azi  .githubusercontent.com/schlatterbeck/plot-antenna/master/test/12-el-azimuth 
E             muth.png">\n<p class="caption">This is the caption for the figure</p>\n</di  .png">\n<figcaption>\n<p>This is the caption for the figure</p>\n</figcapti 
E             v>\n'                                                                        on>\n</figure>\n'

tests/test_rst.py:28: AssertionError
______________________________________________________________ test_rst_fixtures[test_rst_citations.rst] ______________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_citations.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_citations.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert equals failed
E             '<p>Citation references, like <a href="#cit2002" id="id1" rel="nofollow">[C  '<p>Citation references, like <a href="#cit2002" id="citation-reference-1"  
E             IT2002]</a>.\nNote that citations may get\nrearranged, e.g., to the bottom   rel="nofollow">[CIT2002]</a>.\nNote that citations may get\nrearranged, e.g 
E             of\nthe “page”.</p>\n<dl class="citation">\n<dt class="label" id="cit2002">  ., to the bottom of\nthe “page”.</p>\n<div class="citation-list">\n<div cla 
E             <span class="brackets"><a href="#id1" rel="nofollow">CIT2002</a></span></dt  ss="citation" id="cit2002">\n<span class="label"><span class="fn-bracket">[ 
E             >\n<dd><p>A citation\n(as often used in journals).</p>\n</dd>\n</dl>\n<p>Ci  </span><a href="#citation-reference-1" rel="nofollow">CIT2002</a><span clas 
E             tation labels contain alphanumerics,\nunderlines, hyphens and fullstops.\nC  s="fn-bracket">]</span></span>\n<p>A citation\n(as often used in journals). 
E             ase is not significant.</p>\n<p>Given a citation like <a href="#this" id="i  </p>\n</div>\n</div>\n<p>Citation labels contain alphanumerics,\nunderlines 
E             d2" rel="nofollow">[this]</a>, one\ncan also refer to it like <a href="#thi  , hyphens and fullstops.\nCase is not significant.</p>\n<p>Given a citation 
E             s" rel="nofollow">this</a>.</p>\n<dl class="citation">\n<dt class="label" i   like <a href="#this" id="citation-reference-2" rel="nofollow">[this]</a>,  
E             d="this"><span class="brackets"><a href="#id2" rel="nofollow">this</a></spa  one\ncan also refer to it like <a href="#this" rel="nofollow">this</a>.</p> 
E             n></dt>\n<dd><p>here.</p>\n</dd>\n</dl>\n'                                   \n<div class="citation-list">\n<div class="citation" id="this">\n<span clas 
E                                                                                          s="label"><span class="fn-bracket">[</span><a href="#citation-reference-2"  
E                                                                                          rel="nofollow">this</a><span class="fn-bracket">]</span></span>\n<p>here.</ 
E                                                                                          p>\n</div>\n</div>\n'

tests/test_rst.py:28: AssertionError
_____________________________________________________________ test_rst_fixtures[test_rst_admonitions.rst] _____________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_admonitions.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_admonitions.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert equals failed
E             '<div class="admonition danger">\n<p class="admonition-title">!DANGER!</p>\  '<aside class="admonition danger">\n<p class="admonition-title">!DANGER!</p 
E             n<p>Will Robinson</p>\n</div>\n<div class="admonition note">\n<p class="adm  >\n<p>Will Robinson</p>\n</aside>\n<aside class="admonition note">\n<p clas 
E             onition-title">Note</p>\n<p>F Sharp is a note, right?</p>\n</div>\n<div cla  s="admonition-title">Note</p>\n<p>F Sharp is a note, right?</p>\n</aside>\n 
E             ss="admonition admonition-see-also">\n<p class="admonition-title">See also<  <aside class="admonition admonition-see-also">\n<p class="admonition-title" 
E             /p>\n<p>A customized admonition.\nRead more at <a href="https://docutils.so  >See also</p>\n<p>A customized admonition.\nRead more at <a href="https://d 
E             urceforge.io/docs/ref/rst/directives.html#admonitions" rel="nofollow">docut  ocutils.sourceforge.io/docs/ref/rst/directives.html#admonitions" rel="nofol 
E             ils</a></p>\n</div>\n'                                                       low">docutils</a></p>\n</aside>\n'

tests/test_rst.py:28: AssertionError
_________________________________________________________________ test_rst_fixtures[test_rst_003.rst] _________________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_003.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_003.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert equals failed
E             '<div class="section" id="required-packages">\n<h2>Required packages</h2>\n  '<section id="required-packages">\n<h2>Required packages</h2>\n<p>To run th 
E             <p>To run the PyPI software, you need Python 2.5+ and PostgreSQL</p>\n</div  e PyPI software, you need Python 2.5+ and PostgreSQL</p>\n</section>\n<sect 
E             >\n<div class="section" id="quick-development-setup">\n<h2>Quick developmen  ion id="quick-development-setup">\n<h2>Quick development setup</h2>\n<p>Mak 
E             t setup</h2>\n<p>Make sure you are sitting</p>\n</div>\n'                    e sure you are sitting</p>\n</section>\n'

tests/test_rst.py:28: AssertionError
_________________________________________________________________ test_rst_fixtures[test_rst_008.rst] _________________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_008.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_008.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert equals failed
E             None                                                                         '<p>Here is some Python code for a <span class="docutils literal">Dog</span 
E                                                                                          >:</p>\n<pre><code><span class="k">class</span> <span class="nc">Dog</span> 
E                                                                                          <span class="p">(</span><span class="n">Animal</span><span class="p">):</sp 
E                                                                                          an><span class="w">\n</span>    <span class="k">def</span> <span class="fm" 
E                                                                                          >__init__</span><span class="p">(</span><span class="bp">self</span><span c 
E                                                                                          lass="p">,</span> <span class="n">name</span><span class="p">):</span><span 
E                                                                                           class="w">\n</span>        <span class="bp">self</span><span class="o">.</ 
E                                                                                          span><span class="n">name</span> <span class="o">=</span> <span class="n">n 
E                                                                                          ame</span><span class="w">\n\n</span>    <span class="k">def</span> <span c 
E                                                                                          lass="nf">make_sound</span><span class="p">(</span><span class="bp">self</s 
E                                                                                          pan><span class="p">):</span><span class="w">\n</span>        <span class=" 
E                                                                                          nb">print</span><span class="p">(</span><span class="s1">\'Ruff!\'</span><s 
E                                                                                          pan class="p">)</span><span class="w">\n\n</span><span class="n">dog</span> 
E                                                                                           <span class="o">=</span> <span class="n">Dog</span><span class="p">(</span 
E                                                                                          ><span class="s1">\'Fido\'</span><span class="p">)</span></code></pre>\n<p> 
E                                                                                          and then here is some bash:</p>\n<pre><code><span class="k">if</span><span  
E                                                                                          class="w"> </span><span class="o">[</span><span class="w"> </span><span cla 
E                                                                                          ss="s2">&quot;</span><span class="nv">$1</span><span class="s2">&quot;</spa 
E                                                                                          n><span class="w"> </span><span class="o">=</span><span class="w"> </span>< 
E                                                                                          span class="s2">&quot;--help&quot;</span><span class="w"> </span><span clas 
E                                                                                          s="o">]</span><span class="p">;</span><span class="w"> </span><span class=" 
E                                                                                          k">then</span><span class="w">\n    </span><span class="nb">echo</span><spa 
E                                                                                          n class="w"> </span><span class="s2">&quot;OK&quot;</span><span class="w">\ 
E                                                                                          n</span><span class="k">fi</span></code></pre>\n<p>or click <a href="http:/ 
E                                                                                          /www.surveymonkey.com" rel="nofollow">SurveyMonkey</a></p>\n<pre><code>An u 
E                                                                                          nknown code fence block</code></pre>\n'

tests/test_rst.py:28: AssertionError
______________________________________________________________ test_rst_fixtures[test_rst_footnotes.rst] ______________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_footnotes.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_footnotes.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert equals failed
E             '<p>Footnote references, like <a href="#id2" id="id1" rel="nofollow">5</a>.  '<p>Footnote references, like <a href="#footnote-1" id="footnote-reference- 
E             \nNote that footnotes may get\nrearranged, e.g., to the bottom of\nthe “pag  1" rel="nofollow"><span class="fn-bracket">[</span>5<span class="fn-bracket 
E             e”.</p>\n<dl class="footnote brackets">\n<dt class="label" id="id2"><span c  ">]</span></a>.\nNote that footnotes may get\nrearranged, e.g., to the bott 
E             lass="brackets"><a href="#id1" rel="nofollow">5</a></span></dt>\n<dd><p>A n  om of\nthe “page”.</p>\n<aside class="footnote-list brackets">\n<aside clas 
E             umerical footnote. Note\nthere’s no colon after the <span class="docutils l  s="footnote brackets" id="footnote-1">\n<span class="label"><span class="fn 
E             iteral">]</span>.</p>\n</dd>\n</dl>\n<p>Autonumbered footnotes are\npossibl  -bracket">[</span><a href="#footnote-reference-1" rel="nofollow">5</a><span 
E             e, like using <a href="#id5" id="id3" rel="nofollow">1</a> and <a href="#id   class="fn-bracket">]</span></span>\n<p>A numerical footnote. Note\nthere’s 
E             6" id="id4" rel="nofollow">2</a>.</p>\n<dl class="footnote brackets">\n<dt    no colon after the <span class="docutils literal">]</span>.</p>\n</aside>\ 
E             class="label" id="id5"><span class="brackets"><a href="#id3" rel="nofollow"  n</aside>\n<p>Autonumbered footnotes are\npossible, like using <a href="#fo 
E             >1</a></span></dt>\n<dd><p>This is the first one.</p>\n</dd>\n<dt class="la  otnote-2" id="footnote-reference-2" rel="nofollow"><span class="fn-bracket" 
E             bel" id="id6"><span class="brackets"><a href="#id4" rel="nofollow">2</a></s  >[</span>1<span class="fn-bracket">]</span></a> and <a href="#footnote-3" i 
E             pan></dt>\n<dd><p>This is the second one.</p>\n</dd>\n</dl>\n<p>They may be  d="footnote-reference-3" rel="nofollow"><span class="fn-bracket">[</span>2< 
E              assigned ‘autonumber\nlabels’ - for instance,\n<a href="#fourth" id="id7"   span class="fn-bracket">]</span></a>.</p>\n<aside class="footnote-list brac 
E             rel="nofollow">4</a> and <a href="#third" id="id8" rel="nofollow">3</a>.</p  kets">\n<aside class="footnote brackets" id="footnote-2">\n<span class="lab 
E             >\n<dl class="footnote brackets">\n<dt class="label" id="third"><span class  el"><span class="fn-bracket">[</span><a href="#footnote-reference-2" rel="n 
E             ="brackets"><a href="#id8" rel="nofollow">3</a></span></dt>\n<dd><p>a.k.a.   ofollow">1</a><span class="fn-bracket">]</span></span>\n<p>This is the firs 
E             <a href="#third" rel="nofollow">third</a></p>\n</dd>\n<dt class="label" id=  t one.</p>\n</aside>\n<aside class="footnote brackets" id="footnote-3">\n<s 
E             "fourth"><span class="brackets"><a href="#id7" rel="nofollow">4</a></span><  pan class="label"><span class="fn-bracket">[</span><a href="#footnote-refer 
E             /dt>\n<dd><p>a.k.a. <a href="#fourth" rel="nofollow">fourth</a></p>\n</dd>\  ence-3" rel="nofollow">2</a><span class="fn-bracket">]</span></span>\n<p>Th 
E             n</dl>\n<p>Auto-symbol footnotes are also\npossible, like this: <a href="#i  is is the second one.</p>\n</aside>\n</aside>\n<p>They may be assigned ‘aut 
E             d11" id="id9" rel="nofollow">*</a> and <a href="#id12" id="id10" rel="nofol  onumber\nlabels’ - for instance,\n<a href="#fourth" id="footnote-reference- 
E             low">†</a>.</p>\n<dl class="footnote brackets">\n<dt class="label" id="id11  4" rel="nofollow"><span class="fn-bracket">[</span>4<span class="fn-bracket 
E             "><span class="brackets"><a href="#id9" rel="nofollow">*</a></span></dt>\n<  ">]</span></a> and <a href="#third" id="footnote-reference-5" rel="nofollow 
E             dd><p>This is the first one.</p>\n</dd>\n<dt class="label" id="id12"><span   "><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></a>.< 
E             class="brackets"><a href="#id10" rel="nofollow">†</a></span></dt>\n<dd><p>T  /p>\n<aside class="footnote-list brackets">\n<aside class="footnote bracket 
E             his is the second one.</p>\n</dd>\n</dl>\n'                                  s" id="third">\n<span class="label"><span class="fn-bracket">[</span><a hre 
E                                                                                          f="#footnote-reference-5" rel="nofollow">3</a><span class="fn-bracket">]</s 
E                                                                                          pan></span>\n<p>a.k.a. <a href="#third" rel="nofollow">third</a></p>\n</asi 
E                                                                                          de>\n<aside class="footnote brackets" id="fourth">\n<span class="label"><sp 
E                                                                                          an class="fn-bracket">[</span><a href="#footnote-reference-4" rel="nofollow 
E                                                                                          ">4</a><span class="fn-bracket">]</span></span>\n<p>a.k.a. <a href="#fourth 
E                                                                                          " rel="nofollow">fourth</a></p>\n</aside>\n</aside>\n<p>Auto-symbol footnot 
E                                                                                          es are also\npossible, like this: <a href="#footnote-4" id="footnote-refere 
E                                                                                          nce-6" rel="nofollow"><span class="fn-bracket">[</span>*<span class="fn-bra 
E                                                                                          cket">]</span></a> and <a href="#footnote-5" id="footnote-reference-7" rel= 
E                                                                                          "nofollow"><span class="fn-bracket">[</span>†<span class="fn-bracket">]</sp 
E                                                                                          an></a>.</p>\n<aside class="footnote-list brackets">\n<aside class="footnot 
E                                                                                          e brackets" id="footnote-4">\n<span class="label"><span class="fn-bracket"> 
E                                                                                          [</span><a href="#footnote-reference-6" rel="nofollow">*</a><span class="fn 
E                                                                                          -bracket">]</span></span>\n<p>This is the first one.</p>\n</aside>\n<aside  
E                                                                                          class="footnote brackets" id="footnote-5">\n<span class="label"><span class 
E                                                                                          ="fn-bracket">[</span><a href="#footnote-reference-7" rel="nofollow">†</a>< 
E                                                                                          span class="fn-bracket">]</span></span>\n<p>This is the second one.</p>\n</ 
E                                                                                          aside>\n</aside>\n'

tests/test_rst.py:28: AssertionError
========================================================================== warnings summary ===========================================================================
readme_renderer/markdown.py:44
  /sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/readme_renderer/markdown.py:44: UserWarning: Markdown renderers are not available. Install 'readme_renderer[md]' to enable Markdown rendering.
    warnings.warn(_EXTRA_WARNING)

tests/test_cli.py: 10 warnings
tests/test_rst.py: 48 warnings
  /sw/lib/python3.10/site-packages/docutils/io.py:245: DeprecationWarning: 'U' mode is deprecated
    self.source = open(source_path, mode, **kwargs)

tests/test_markdown.py::test_missing_variant
  /sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/readme_renderer/markdown.py:60: UserWarning: Markdown renderers are not available. Install 'readme_renderer[md]' to enable Markdown rendering.
    warnings.warn(_EXTRA_WARNING)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================= short test summary info =======================================================================
FAILED tests/test_cli.py::test_cli_input_file[test_rst_003.rst-False] - assert equals failed
FAILED tests/test_cli.py::test_cli_input_file[test_rst_003.rst-True] - assert equals failed
FAILED tests/test_cli.py::test_cli_explicit_format[test_rst_003.rst] - assert equals failed
FAILED tests/test_cli.py::test_cli_package[docutils-Docutils is a modular system for processing documentation] - SystemExit: 1
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_tables.rst] - assert equals failed
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_contents.rst] - assert equals failed
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_docinfo.rst] - assert equals failed
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_linkify.rst] - assert equals failed
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_bibtex.rst] - assert equals failed
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_caption.rst] - assert equals failed
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_figure.rst] - assert equals failed
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_citations.rst] - assert equals failed
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_admonitions.rst] - assert equals failed
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_003.rst] - assert equals failed
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_008.rst] - assert equals failed
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_footnotes.rst] - assert equals failed
======================================================== 16 failed, 26 passed, 7 skipped, 60 warnings in 2.18s ========================================================
@miketheman
Copy link
Member

We use tox as our test runner, which creates an isolated test environment.
I can see from the output shown that there are unexpected plugins in that test environment that could be changing the behavior in unexpected ways.

Here's what it looks like on macOS running 3.10 for the 41.0 release:

$ git checkout 41.0
HEAD is now at 9c0f7d8 Release 41.0 (#292)
$ tox -e py310
py310: install_deps> python -I -m pip install pytest pytest-cov
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0'
.pkg: _optional_hooks> python /usr/local/Cellar/tox/4.13.0/libexec/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /usr/local/Cellar/tox/4.13.0/libexec/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_wheel> python /usr/local/Cellar/tox/4.13.0/libexec/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: prepare_metadata_for_build_wheel> python /usr/local/Cellar/tox/4.13.0/libexec/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /usr/local/Cellar/tox/4.13.0/libexec/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py310: install_package_deps> python -I -m pip install 'Pygments>=2.5.1' 'bleach>=2.1.0' 'cmarkgfm>=0.8.0' 'docutils>=0.13.1'
py310: install_package> python -I -m pip install --force-reinstall --no-deps /Users/miketheman/workspace/miketheman/readme_renderer/.tox/.tmp/package/1/readme_renderer-41.0.tar.gz
py310: commands[0]> pytest --strict-markers --cov
======================================================================================= test session starts =======================================================================================
platform darwin -- Python 3.10.13, pytest-8.0.2, pluggy-1.4.0
cachedir: .tox/py310/.pytest_cache
rootdir: /Users/miketheman/workspace/miketheman/readme_renderer
plugins: cov-4.1.0
collected 91 items

tests/test_clean.py .                                                                                                                                                                       [  1%]
tests/test_cli.py ...............                                                                                                                                                           [ 17%]
tests/test_markdown.py ............................................                                                                                                                         [ 65%]
tests/test_noextra.py ss                                                                                                                                                                    [ 68%]
tests/test_rst.py ............................                                                                                                                                              [ 98%]
tests/test_txt.py .                                                                                                                                                                         [100%]

--------- coverage: platform darwin, python 3.10.13-final-0 ----------
Name                          Stmts   Miss Branch BrPart  Cover
---------------------------------------------------------------
readme_renderer/__init__.py       0      0      0      0   100%
readme_renderer/__main__.py      44      7     22      4    77%
readme_renderer/clean.py         39      3     20      1    93%
readme_renderer/markdown.py      46      6      8      2    85%
readme_renderer/rst.py           34      0     12      1    98%
readme_renderer/txt.py            6      0      0      0   100%
tests/__init__.py                 0      0      0      0   100%
tests/test_clean.py               3      0      0      0   100%
tests/test_cli.py                46      0     22      0   100%
tests/test_markdown.py           12      0      6      0   100%
tests/test_noextra.py             9      4      2      0    45%
tests/test_rst.py                39      0      8      0   100%
tests/test_txt.py                11      0      6      0   100%
---------------------------------------------------------------
TOTAL                           289     20    106      8    91%


================================================================================== 89 passed, 2 skipped in 2.09s ==================================================================================
.pkg: _exit> python /usr/local/Cellar/tox/4.13.0/libexec/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  py310: OK (23.28=setup[20.46]+cmd[2.83] seconds)
  congratulations :) (23.42 seconds)

Mainly, note the difference in the plugins list at the top of the test run. In isolation, we should only see cov-4.1.0 but your run has a lot more than that, so I really cannot account for what's failing in your environment.

Considering that nh3 also produces packaged wheels, I don't understand why you would need rust, unless you're not actually executing this in a macOS context, rather some other system isolation that isn't a platform that nh3 builds binaries for - but none of that is clear from your report.

@nieder
Copy link
Author

nieder commented Mar 5, 2024

Thanks for following up. I removed all plugins except pytest-cov and made sure to update pytest-cov and pluggy to match what your tox is installing. I even updated my python to the latest upstream. I also installed the optional dep cmarkgfm to make sure all tests were being excersised.

tests output w/out plugins
/sw/bin/py.test-3.10 --strict-markers --cov || exit 2
===================================================================== test session starts ======================================================================
platform darwin -- Python 3.10.13, pytest-7.4.4, pluggy-1.4.0
rootdir: /sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0
plugins: cov-4.1.0
collected 91 items                                                                                                                                             

tests/test_clean.py .                                                                                                                                    [  1%]
tests/test_cli.py ..FF......F...F                                                                                                                        [ 17%]
tests/test_markdown.py F....F.....................F....F...........                                                                                      [ 65%]
tests/test_noextra.py ss                                                                                                                                 [ 68%]
tests/test_rst.py FFFF..FF..FFF..F.F.F........                                                                                                           [ 98%]
tests/test_txt.py .                                                                                                                                      [100%]

=========================================================================== FAILURES ===========================================================================
_________________________________________________________ test_cli_input_file[test_rst_003.rst-False] __________________________________________________________

input_file = PosixPath('tests/fixtures/test_rst_003.rst'), output_file = False

    @pytest.mark.parametrize("output_file", [False, True])
    def test_cli_input_file(input_file, output_file):
        with mock.patch("builtins.print") as print_:
            if output_file:
                with tempfile.TemporaryDirectory() as tmpdir:
                    output = pathlib.Path(tmpdir) / "output.html"
                    main(["-o", str(output), str(input_file)])
                    with output.open() as fp:
                        result = fp.read()
            else:
                main([str(input_file)])
    
        print_.assert_called_once()
        (result,), kwargs = print_.call_args
    
        with input_file.with_suffix(".html").open() as fp:
            expected = fp.read()
>       assert result.strip() == expected.strip()
E       assert '<div class="...g</p>\n</div>' == '<section id=...>\n</section>'
E         - <section id="required-packages">
E         + <div class="section" id="required-packages">
E         ?  +++++++++++       +
E           <h2>Required packages</h2>
E           <p>To run the PyPI software, you need Python 2.5+ and PostgreSQL</p>
E         - </section>
E         + </div>...
E         
E         ...Full output truncated (7 lines hidden), use '-vv' to show

tests/test_cli.py:35: AssertionError
__________________________________________________________ test_cli_input_file[test_rst_003.rst-True] __________________________________________________________

input_file = PosixPath('tests/fixtures/test_rst_003.rst'), output_file = True

    @pytest.mark.parametrize("output_file", [False, True])
    def test_cli_input_file(input_file, output_file):
        with mock.patch("builtins.print") as print_:
            if output_file:
                with tempfile.TemporaryDirectory() as tmpdir:
                    output = pathlib.Path(tmpdir) / "output.html"
                    main(["-o", str(output), str(input_file)])
                    with output.open() as fp:
                        result = fp.read()
            else:
                main([str(input_file)])
    
        print_.assert_called_once()
        (result,), kwargs = print_.call_args
    
        with input_file.with_suffix(".html").open() as fp:
            expected = fp.read()
>       assert result.strip() == expected.strip()
E       assert '<div class="...g</p>\n</div>' == '<section id=...>\n</section>'
E         - <section id="required-packages">
E         + <div class="section" id="required-packages">
E         ?  +++++++++++       +
E           <h2>Required packages</h2>
E           <p>To run the PyPI software, you need Python 2.5+ and PostgreSQL</p>
E         - </section>
E         + </div>...
E         
E         ...Full output truncated (7 lines hidden), use '-vv' to show

tests/test_cli.py:35: AssertionError
__________________________________________________________ test_cli_explicit_format[test_rst_003.rst] __________________________________________________________

input_file = PosixPath('tests/fixtures/test_rst_003.rst')

    def test_cli_explicit_format(input_file):
        fmt = input_file.suffix.lstrip(".")
        with input_file.open() as fp, \
                mock.patch("pathlib.Path.open", return_value=fp), \
                mock.patch("builtins.print") as print_:
            main(["-f", fmt, "no-file.invalid"])
            print_.assert_called_once()
            (result,), _ = print_.call_args
    
        with input_file.with_suffix(".html").open() as fp:
>           assert result.strip() == fp.read().strip()
E           assert '<div class="...g</p>\n</div>' == '<section id=...>\n</section>'
E             - <section id="required-packages">
E             + <div class="section" id="required-packages">
E             ?  +++++++++++       +
E               <h2>Required packages</h2>
E               <p>To run the PyPI software, you need Python 2.5+ and PostgreSQL</p>
E             - </section>
E             + </div>...
E             
E             ...Full output truncated (7 lines hidden), use '-vv' to show

tests/test_cli.py:57: AssertionError
_____________________________________ test_cli_package[docutils-Docutils is a modular system for processing documentation] _____________________________________

package = 'docutils', contains = 'Docutils is a modular system for processing documentation'

    @pytest.mark.parametrize("package, contains", [
        ("readme_renderer", "Readme Renderer is a library that will safely render"),
        ("docutils", "Docutils is a modular system for processing documentation"),
    ])
    def test_cli_package(package, contains):
        with mock.patch("builtins.print") as print_:
>           main(["-p", package])

tests/test_cli.py:66: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cli_args = ['-p', 'docutils']

    def main(cli_args: Optional[List[str]] = None) -> None:
        parser = argparse.ArgumentParser(
            description="Renders a .md, .rst, or .txt README to HTML",
        )
        parser.add_argument("-p", "--package", help="Get README from package metadata",
                            action="store_true")
        parser.add_argument("-f", "--format", choices=["md", "rst", "txt"],
                            help="README format (inferred from input file name or package)")
        parser.add_argument('input', help="Input README file or package name")
        parser.add_argument('-o', '--output', help="Output file (default: stdout)",
                            type=argparse.FileType('w'), default='-')
        args = parser.parse_args(cli_args)
    
        content_format = args.format
        if args.package:
            message = metadata(args.input)
            source = message.get_payload()  # type: ignore[attr-defined] # noqa: E501 https://peps.python.org/pep-0566/
    
            # Infer the format of the description from package metadata.
            if not content_format:
                content_type = message.get("Description-Content-Type", "text/x-rst")  # type: ignore[attr-defined] # noqa: E501 https://github.com/python/typeshed/issues/10021
                if content_type == "text/x-rst":
                    content_format = "rst"
                elif content_type == "text/markdown":
                    content_format = "md"
                elif content_type == "text/plain":
                    content_format = "txt"
                else:
                    raise ValueError(f"invalid content type {content_type} for package "
                                     "`long_description`")
        else:
            filename = pathlib.Path(args.input)
            content_format = content_format or filename.suffix.lstrip(".")
            with filename.open() as fp:
                source = fp.read()
    
        if content_format == "md":
            rendered = render_md(source, stream=sys.stderr)
        elif content_format == "rst":
            rendered = render_rst(source, stream=sys.stderr)
        elif content_format == "txt":
            rendered = render_txt(source, stream=sys.stderr)
        else:
            raise ValueError(f"invalid README format: {content_format} (expected `md`, "
                             "`rst`, or `txt`)")
        if rendered is None:
>           sys.exit(1)
E           SystemExit: 1

readme_renderer/__main__.py:57: SystemExit
--------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------
No content rendered from RST source.
__________________________________________________________ test_md_fixtures[test_GFM_doublequotes.md] __________________________________________________________

md_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_GFM_doublequotes.md')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_GFM_doublequotes.html'), variant = 'GFM'

    @pytest.mark.parametrize(
        ("md_filename", "html_filename", "variant"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), variant, id=fn.name))
            for variant in variants
            for fn in Path(__file__).parent.glob(f"fixtures/test_{variant}*.md")
        ],
    )
    def test_md_fixtures(md_filename, html_filename, variant):
        # Get our Markup
        with open(md_filename, encoding='utf-8') as f:
            md_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
>       assert render(md_markup, variant=variant) == expected
E       assert '<p>This is n...an>\n</pre>\n' == '<p>This is n...an>\n</pre>\n'
E         Skipping 174 identical leading characters in diff, use -v to show
E           ):</span>
E         - <span class="w">    </span><span class="sd">&quot;&quot;&quot;This is a docstring.&quot;&quot;&quot;</span>
E         ?      ---------------------------
E         +     <span class="sd">&quot;&quot;&quot;This is a docstring.&quot;&quot;&quot;</span>
E         ? ++++
E               <span class="k">pass</span>...
E         
E         ...Full output truncated (11 lines hidden), use '-vv' to show

tests/test_markdown.py:25: AssertionError
_________________________________________________________ test_md_fixtures[test_GFM_malicious_pre.md] __________________________________________________________

md_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_GFM_malicious_pre.md')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_GFM_malicious_pre.html'), variant = 'GFM'

    @pytest.mark.parametrize(
        ("md_filename", "html_filename", "variant"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), variant, id=fn.name))
            for variant in variants
            for fn in Path(__file__).parent.glob(f"fixtures/test_{variant}*.md")
        ],
    )
    def test_md_fixtures(md_filename, html_filename, variant):
        # Get our Markup
        with open(md_filename, encoding='utf-8') as f:
            md_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
>       assert render(md_markup, variant=variant) == expected
E       assert '<p>This is n...an>\n</pre>\n' == '<p>This is n...an>\n</pre>\n'
E         Skipping 130 identical leading characters in diff, use -v to show
E           ):</span>
E         - <span class="w">    </span><span class="sd">&quot;&quot;&quot;This is a docstring.&quot;&quot;&quot;</span>
E         ?      ---------------------------
E         +     <span class="sd">&quot;&quot;&quot;This is a docstring.&quot;&quot;&quot;</span>
E         ? ++++
E               <span class="k">pass</span>...
E         
E         ...Full output truncated (2 lines hidden), use '-vv' to show

tests/test_markdown.py:25: AssertionError
___________________________________________________________ test_md_fixtures[test_GFM_highlight.md] ____________________________________________________________

md_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_GFM_highlight.md')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_GFM_highlight.html'), variant = 'GFM'

    @pytest.mark.parametrize(
        ("md_filename", "html_filename", "variant"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), variant, id=fn.name))
            for variant in variants
            for fn in Path(__file__).parent.glob(f"fixtures/test_{variant}*.md")
        ],
    )
    def test_md_fixtures(md_filename, html_filename, variant):
        # Get our Markup
        with open(md_filename, encoding='utf-8') as f:
            md_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
>       assert render(md_markup, variant=variant) == expected
E       assert '<p>This is n...ock\n</pre>\n' == '<p>This is n...ock\n</pre>\n'
E         Skipping 338 identical leading characters in diff, use -v to show
E         - (){</span>
E         + (){</span><span class="w"></span>
E         + <span class="w">    </span><span class="k">return</span><span class="w"></span>
E         - <span class="w">    </span><span class="k">return</span>
E         ?              ^  ^^^^                    ^  ------
E         + <span class="p">}</span><span class="w"></span>...
E         
E         ...Full output truncated (5 lines hidden), use '-vv' to show

tests/test_markdown.py:25: AssertionError
___________________________________________________________ test_md_fixtures[test_CommonMark_008.md] ___________________________________________________________

md_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_CommonMark_008.md')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_CommonMark_008.html'), variant = 'CommonMark'

    @pytest.mark.parametrize(
        ("md_filename", "html_filename", "variant"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), variant, id=fn.name))
            for variant in variants
            for fn in Path(__file__).parent.glob(f"fixtures/test_{variant}*.md")
        ],
    )
    def test_md_fixtures(md_filename, html_filename, variant):
        # Get our Markup
        with open(md_filename, encoding='utf-8') as f:
            md_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
>       assert render(md_markup, variant=variant) == expected
E       assert '<p>Here is s...key</a></p>\n' == '<p>Here is s...key</a></p>\n'
E         Skipping 1054 identical leading characters in diff, use -v to show
E         - >if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span><span class="s2">&quot;</span><span class="nv">$1</span><span class="s2">&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;--help&quot;</span><span class="w"> </span><span class="o">]</span><span class="p">;</span><span class="w"> </span><span class="k">then</span>
E         - <span class="w">    </span><span class="nb">echo</span><span class="w"> </span><span class="s2">&quot...
E         
E         ...Full output truncated (6 lines hidden), use '-vv' to show

tests/test_markdown.py:25: AssertionError
____________________________________________________________ test_rst_fixtures[test_rst_tables.rst] ____________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_tables.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_tables.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           AssertionError: assert '<table>\n<co...>\n</table>\n' == '<table>\n<th...>\n</table>\n'
E               <table>
E             + <colgroup>
E             + <col>
E             + <col>
E             + <col>
E             + <col>
E             + </colgroup>...
E             
E             ...Full output truncated (55 lines hidden), use '-vv' to show

tests/test_rst.py:28: AssertionError
___________________________________________________________ test_rst_fixtures[test_rst_contents.rst] ___________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_contents.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_contents.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert '<div class=".../p>\n</div>\n' == '<nav class="...n</section>\n'
E             - <nav class="contents" id="contents">
E             ?  ^^
E             + <div class="contents topic" id="contents">
E             ?  ^^                 ++++++
E             - <p class="topic-title">Contents</p>
E             + <p class="topic-title first">Contents</p>
E             ?                      ++++++...
E             
E             ...Full output truncated (39 lines hidden), use '-vv' to show

tests/test_rst.py:28: AssertionError
___________________________________________________________ test_rst_fixtures[test_rst_docinfo.rst] ____________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_docinfo.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_docinfo.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert '<dl class="d...h2>\n</div>\n' == '<dl class="d...n</section>\n'
E             Skipping 46 identical leading characters in diff, use -v to show
E             - ">Project<span class="colon">:</span></dt>
E             + ">Project</dt>
E               <dd class="project"><p>pg_query – Pythonic wrapper around libpg_query</p>
E               </dd>
E             - <dt class="created">Created<span class="colon">:</span></dt>
E             + <dt class="created">Created</dt>...
E             
E             ...Full output truncated (19 lines hidden), use '-vv' to show

tests/test_rst.py:28: AssertionError
___________________________________________________________ test_rst_fixtures[test_rst_linkify.rst] ____________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_linkify.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_linkify.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert '<a href="htt...dl>\n</div>\n' == '<a href="htt...n</section>\n'
E             Skipping 1458 identical leading characters in diff, use -v to show
E               res.</p>
E             - <section id="status">
E             + <div class="section" id="status">
E             ?  +++++++++++       +
E               <h2>Status</h2>
E               <p>multigtfs is ready for your GTFS project.</p>...
E             
E             ...Full output truncated (47 lines hidden), use '-vv' to show

tests/test_rst.py:28: AssertionError
____________________________________________________________ test_rst_fixtures[test_rst_bibtex.rst] ____________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_bibtex.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_bibtex.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert '<pre><code><...code></pre>\n' == '<pre><code><...code></pre>\n'
E             Skipping 285 identical leading characters in diff, use -v to show
E             -  </span><s>{2022}</s><span class="p">,</span></code></pre>
E             +  </span><span class="s">{2022}</span><span class="p">,</span></code></pre>
E             ?           +++++++++++++          +++

tests/test_rst.py:28: AssertionError
___________________________________________________________ test_rst_fixtures[test_rst_caption.rst] ____________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_caption.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_caption.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           AssertionError: assert '<table>\n<ca...>\n</table>\n' == '<table>\n<ca...>\n</table>\n'
E             Skipping 33 identical leading characters in diff, use -v to show
E               caption>
E             + <colgroup>
E             + <col>
E             + <col>
E             + <col>
E             + <col>...
E             
E             ...Full output truncated (43 lines hidden), use '-vv' to show

tests/test_rst.py:28: AssertionError
____________________________________________________________ test_rst_fixtures[test_rst_figure.rst] ____________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_figure.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_figure.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert '<div class=".../p>\n</div>\n' == '<figure clas...\n</figure>\n'
E             - <figure class="align-center">
E             ?  ^ ^^^^
E             + <div class="figure align-center">
E             ?  ^ ^        +++++++
E               <img alt="https://raw.githubusercontent.com/schlatterbeck/plot-antenna/master/test/12-el-azimuth.png" src="https://raw.githubusercontent.com/schlatterbeck/plot-antenna/master/test/12-el-azimuth.png">
E             + <p class="caption">This is the caption for the figure</p>
E             + </div>...
E             
E             ...Full output truncated (4 lines hidden), use '-vv' to show

tests/test_rst.py:28: AssertionError
__________________________________________________________ test_rst_fixtures[test_rst_citations.rst] ___________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_citations.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_citations.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert '<p>Citation .../dd>\n</dl>\n' == '<p>Citation ...iv>\n</div>\n'
E             Skipping 42 identical leading characters in diff, use -v to show
E             - 2002" id="citation-reference-1" rel="nofollow">[CIT2002]</a>.
E             ?           - ^^^^^^^^^^^^^^^^^
E             + 2002" id="id1" rel="nofollow">[CIT2002]</a>.
E             ?            ^
E               Note that citations may get
E               rearranged, e.g., to the bottom of...
E             
E             ...Full output truncated (46 lines hidden), use '-vv' to show

tests/test_rst.py:28: AssertionError
_________________________________________________________ test_rst_fixtures[test_rst_admonitions.rst] __________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_admonitions.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_admonitions.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert '<div class=".../p>\n</div>\n' == '<aside class...>\n</aside>\n'
E             - <aside class="admonition danger">
E             ?  ^^ ^^
E             + <div class="admonition danger">
E             ?  ^ ^
E               <p class="admonition-title">!DANGER!</p>
E               <p>Will Robinson</p>
E             - </aside>...
E             
E             ...Full output truncated (18 lines hidden), use '-vv' to show

tests/test_rst.py:28: AssertionError
_____________________________________________________________ test_rst_fixtures[test_rst_003.rst] ______________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_003.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_003.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert '<div class=".../p>\n</div>\n' == '<section id=...n</section>\n'
E             - <section id="required-packages">
E             + <div class="section" id="required-packages">
E             ?  +++++++++++       +
E               <h2>Required packages</h2>
E               <p>To run the PyPI software, you need Python 2.5+ and PostgreSQL</p>
E             - </section>
E             + </div>...
E             
E             ...Full output truncated (7 lines hidden), use '-vv' to show

tests/test_rst.py:28: AssertionError
_____________________________________________________________ test_rst_fixtures[test_rst_008.rst] ______________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_008.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_008.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert None == '<p>Here is some Python code for a <span class="docutils literal">Dog</span>:</p>\n<pre><code><span class="k">class</s...ttp://www.surveymonkey.com" rel="nofollow">SurveyMonkey</a></p>\n<pre><code>An unknown code fence block</code></pre>\n'

tests/test_rst.py:28: AssertionError
__________________________________________________________ test_rst_fixtures[test_rst_footnotes.rst] ___________________________________________________________

rst_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_footnotes.rst')
html_filename = PosixPath('/sw/build.build/readme-renderer-py310-41.0-1/readme_renderer-41.0/tests/fixtures/test_rst_footnotes.html')

    @pytest.mark.parametrize(
        ("rst_filename", "html_filename"),
        [
            (pytest.param(fn, fn.with_suffix(".html"), id=fn.name))
            for fn in Path(__file__).parent.glob("fixtures/test_*.rst")
        ],
    )
    def test_rst_fixtures(rst_filename, html_filename):
        # Get our Markup
        with open(rst_filename, encoding='utf-8') as f:
            rst_markup = f.read()
    
        # Get our expected
        with open(html_filename, encoding="utf-8") as f:
            expected = f.read()
    
        out = render(rst_markup)
    
        if "<" in expected:
>           assert out == expected
E           assert '<p>Footnote .../dd>\n</dl>\n' == '<p>Footnote ...>\n</aside>\n'
E             - <p>Footnote references, like <a href="#footnote-1" id="footnote-reference-1" rel="nofollow"><span class="fn-bracket">[</span>5<span class="fn-bracket">]</span></a>.
E             + <p>Footnote references, like <a href="#id2" id="id1" rel="nofollow">5</a>.
E               Note that footnotes may get
E               rearranged, e.g., to the bottom of
E               the “page”.</p>
E             - <aside class="footnote-list brackets">
E             ?  --- ^                -----...
E             
E             ...Full output truncated (89 lines hidden), use '-vv' to show

tests/test_rst.py:28: AssertionError
======================================================================= warnings summary =======================================================================
tests/test_cli.py: 10 warnings
tests/test_rst.py: 48 warnings
  /sw/lib/python3.10/site-packages/docutils/io.py:245: DeprecationWarning: 'U' mode is deprecated
    self.source = open(source_path, mode, **kwargs)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

--------- coverage: platform darwin, python 3.10.13-final-0 ----------
Name                          Stmts   Miss Branch BrPart  Cover
---------------------------------------------------------------
readme_renderer/__init__.py       0      0      0      0   100%
readme_renderer/__main__.py      44      6     20      3    80%
readme_renderer/clean.py         39      3     20      1    93%
readme_renderer/markdown.py      46      6      8      2    85%
readme_renderer/rst.py           34      0     12      0   100%
readme_renderer/txt.py            6      0      0      0   100%
tests/__init__.py                 0      0      0      0   100%
tests/test_clean.py               3      0      0      0   100%
tests/test_cli.py                46      0      6      0   100%
tests/test_markdown.py           12      0      2      0   100%
tests/test_noextra.py             9      4      0      0    56%
tests/test_rst.py                39      0      4      0   100%
tests/test_txt.py                11      0      2      0   100%
---------------------------------------------------------------
TOTAL                           289     19     74      6    92%

=================================================================== short test summary info ====================================================================
FAILED tests/test_cli.py::test_cli_input_file[test_rst_003.rst-False] - assert '<div class="...g</p>\n</div>' == '<section id=...>\n</section>'
FAILED tests/test_cli.py::test_cli_input_file[test_rst_003.rst-True] - assert '<div class="...g</p>\n</div>' == '<section id=...>\n</section>'
FAILED tests/test_cli.py::test_cli_explicit_format[test_rst_003.rst] - assert '<div class="...g</p>\n</div>' == '<section id=...>\n</section>'
FAILED tests/test_cli.py::test_cli_package[docutils-Docutils is a modular system for processing documentation] - SystemExit: 1
FAILED tests/test_markdown.py::test_md_fixtures[test_GFM_doublequotes.md] - assert '<p>This is n...an>\n</pre>\n' == '<p>This is n...an>\n</pre>\n'
FAILED tests/test_markdown.py::test_md_fixtures[test_GFM_malicious_pre.md] - assert '<p>This is n...an>\n</pre>\n' == '<p>This is n...an>\n</pre>\n'
FAILED tests/test_markdown.py::test_md_fixtures[test_GFM_highlight.md] - assert '<p>This is n...ock\n</pre>\n' == '<p>This is n...ock\n</pre>\n'
FAILED tests/test_markdown.py::test_md_fixtures[test_CommonMark_008.md] - assert '<p>Here is s...key</a></p>\n' == '<p>Here is s...key</a></p>\n'
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_tables.rst] - AssertionError: assert '<table>\n<co...>\n</table>\n' == '<table>\n<th...>\n</table>\n'
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_contents.rst] - assert '<div class=".../p>\n</div>\n' == '<nav class="...n</section>\n'
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_docinfo.rst] - assert '<dl class="d...h2>\n</div>\n' == '<dl class="d...n</section>\n'
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_linkify.rst] - assert '<a href="htt...dl>\n</div>\n' == '<a href="htt...n</section>\n'
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_bibtex.rst] - assert '<pre><code><...code></pre>\n' == '<pre><code><...code></pre>\n'
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_caption.rst] - AssertionError: assert '<table>\n<ca...>\n</table>\n' == '<table>\n<ca...>\n</table>\n'
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_figure.rst] - assert '<div class=".../p>\n</div>\n' == '<figure clas...\n</figure>\n'
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_citations.rst] - assert '<p>Citation .../dd>\n</dl>\n' == '<p>Citation ...iv>\n</div>\n'
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_admonitions.rst] - assert '<div class=".../p>\n</div>\n' == '<aside class...>\n</aside>\n'
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_003.rst] - assert '<div class=".../p>\n</div>\n' == '<section id=...n</section>\n'
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_008.rst] - assert None == '<p>Here is some Python code for a <span class="docutils literal">Dog</span>:</p>\n<pre><code><span class="k">class</s...ttp://www.surveymon...
FAILED tests/test_rst.py::test_rst_fixtures[test_rst_footnotes.rst] - assert '<p>Footnote .../dd>\n</dl>\n' == '<p>Footnote ...>\n</aside>\n'
==================================================== 20 failed, 69 passed, 2 skipped, 58 warnings in 3.09s =====================================================

This is in the context of Fink, a package manager. I can't use the compiled nh3 wheels because policy is to not use vendor binaries (MacPorts also has the same policy, don't know about homebrew). We also avoid testing with tox because it has network access during the build to download many deps (most of which already exist in the build system), which is also against policy (as with many other Linux distributions). So that's why I'm running the tests directly rather than through a test runner.

@nieder
Copy link
Author

nieder commented Mar 5, 2024

This actually led me to make a minimal install with no other python mods installed. I then ran tox -e py310 outside our build system (all tests passed) and saved the .tox directory. I then ran the tests manually using the .tox directory with PYTHONPATH and the tests passed. So the problem is not about not running through tox itself, but something else missing. Comparing the system-site-packages and tox-site-packages the biggest differences are pygments and docutils, even though both of my local installs of those pass the required version minimums in setup.py. I'll need to start digging into matching install versions as much as possible to see if that does it.

@kurtmckee
Copy link
Contributor

This looks similar to what I was seeing when I reported #310, and resolved in #315.

@nieder The test suite compares rendered documents against known outputs, and different docutils versions sometimes change their output. This has the potential to be brittle, but is why it's so important to rely on tox to set up the test environment.

@miketheman I anticipate that this can be closed.

@nieder
Copy link
Author

nieder commented Jul 30, 2024

@kurtmckee it does look similar. Trying to update local docutils (to not the latest but newer than I have) fixes a bunch of the test failures, so it does seem to be docutils fragility.

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