wpilibsuite / sphinxext-opengraph

Sphinx extension to generate unique OpenGraph metadata
https://sphinxext-opengraph.readthedocs.io
Other
74 stars 27 forks source link

Test multiple Sphinx/OS #36

Closed Daltz333 closed 1 year ago

Daltz333 commented 3 years ago

Some tests pass, and others fail.

Some successful tests

tests/test_options.py::test_simple PASSED                                                                                   [  4%]
tests/test_options.py::test_site_url PASSED                                                                                 [  9%]
tests/test_options.py::test_image PASSED                                                                                    [ 14%]
tests/test_options.py::test_image_alt FAILED                                                                                [ 19%]
tests/test_options.py::test_type PASSED                                                                                     [ 23%]
tests/test_options.py::test_description_length PASSED                                                                       [ 28%]
tests/test_options.py::test_site_name FAILED                                                                                [ 33%]
tests/test_options.py::test_first_image FAILED                                                                              [ 38%]
tests/test_options.py::test_first_image_no_image FAILED                                                                     [ 42%]
tests/test_options.py::test_skip_admonitions FAILED                                                                         [ 47%]
tests/test_options.py::test_skip_first_title FAILED                                                                         [ 52%]
tests/test_options.py::test_skip_title_punctuation FAILED                                                                   [ 57%]
tests/test_options.py::test_remove_double_spacing FAILED                                                                    [ 61%]
tests/test_options.py::test_list_punctuation FAILED                                                                         [ 66%]
tests/test_options.py::test_nested_list_punctuation FAILED                                                                  [ 71%]
tests/test_options.py::test_skip_comments FAILED                                                                            [ 76%]
tests/test_options.py::test_custom_tags FAILED                                                                              [ 80%]
tests/test_options.py::test_skip_raw FAILED

test_image_alt test output

_________________________________________________________ test_image_alt _________________________________________________________

og_meta_tags = [<meta content="&lt;no title&gt;" property="og:title"/>, <meta content="website" property="og:type"/>, <meta content="...l"/>, <meta content="" property="og:description"/>, <meta content="http://example.org/image.png" property="og:image"/>]

    @pytest.mark.sphinx("html", testroot="image")
    def test_image_alt(og_meta_tags):
>       assert get_tag_content(og_meta_tags, "image:alt") == "Example's Docs!"

tests\test_options.py:42:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\test_options.py:13: in get_tag_content
    return get_tag(tags, tag_type).get("content", "")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

tags = [<meta content="&lt;no title&gt;" property="og:title"/>, <meta content="website" property="og:type"/>, <meta content="...l"/>, <meta content="" property="og:description"/>, <meta content="http://example.org/image.png" property="og:image"/>]
tag_type = 'image:alt'

    def get_tag(tags, tag_type):
>       return [tag for tag in tags if tag.get("property") == "og:{}".format(tag_type)][0]
E       IndexError: list index out of range

tests\test_options.py:8: IndexError
TheTripleV commented 3 years ago

We should test on all platforms.

The workflow should be:

  1. ubuntu python3.6 builds the wheel and uploads it as an artifact
  2. [win, mac, ubuntu] x [py 3.6, 3.7, 3.8, 3.9] download and test the wheel
  3. ubuntu uploads the wheel
Daltz333 commented 3 years ago

We should also test on major supported sphinx versions

hugovk commented 1 year ago

Please see PR #70.