- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
test: Do test with docutils-0.17b1 #8870
Conversation
e6e8908
to
5012b12
Compare
if docutils.__version_info__ < (0, 17): | ||
FIGURE_CAPTION = ".//div[@class='figure align-default']/p[@class='caption']" | ||
else: | ||
FIGURE_CAPTION = ".//figure/figcaption/p" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since v0.17, docutils starts to use <figure>
and <figcaption>
for figure and its caption on HTML output.
@@ -74,7 +74,7 @@ def test_mangle_signature(): | |||
|
|||
|
|||
def test_extract_summary(capsys): | |||
settings = Mock(language_code='', | |||
settings = Mock(language_code='en', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since v0.17, docutils starts to load language module on parsing reST document using StateMachine directly. So far, our testcase uses invalid language code for testing autosummary.
assert_count(expected_expr, result, 1) | ||
else: | ||
expected_expr = """<iframe src="http://sphinx-doc.org"></iframe></section>""" | ||
assert_count(expected_expr, result, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since v0.17, docutils starts to use
expected_expr = '<p class="caption"><span class="caption-text">HIDDEN TOC</span></p>' | ||
assert expected_expr in result | ||
else: | ||
expected_expr = '<p><span class="caption-text">HIDDEN TOC</span></p>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a side-effect of migration to <figcaption>
, the caption of toctree is also rendered using <figcaption>
, and it's broken (closing tag is missing). It would be better to use another node for toctree caption.
Third-party applications may (ab)use the "caption" element for other purposes as a figure caption. See sphinx-doc/sphinx#8870 git-svn-id: svn://svn.code.sf.net/p/docutils/code/trunk@8624 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Third-party applications may (ab)use the "caption" element for other purposes as a figure caption. See sphinx-doc/sphinx#8870 git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8624 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Since v0.17, docutils starts to use <figure> and <figcaption> for figure and its caption on HTML output. This modifies the expected value of our testcases to support it.
Since v0.17, docutils starts to load language module on parsing reST document using StateMachine directly. So far, our testcase uses invalid language code for testing autosummary. This fixes it to work with new docutils.
Since v0.17, docutils starts to use <section> for section on HTML output. This modifies the expected value of our testcases to support it.
Since v0.17, docutils starts to use <figcaption> for caption on HTML output. This modifies the expected value of our testcases to support it.
5012b12
to
cf2d11f
Compare
Since docutils-0.17, the caption node should not use for the non-figure nodes. Therefore, this replaces it by the title node.
Since docutils-0.17, the caption node should not use for the non-figure nodes. Therefore, this replaces it by the title node.
Since docutils-0.17, the caption node should not use for the non-figure nodes. Therefore, this replaces it by the title node.
Since docutils-0.17, the caption node should not use for the non-figure nodes. Therefore, this replaces it by the title node.
Since docutils-0.17, the caption node should not use for the non-figure nodes. Therefore, this replaces it by the title node.
Fix #8870: Use title node for the caption of toctree
Since docutils-0.17, the caption node should not use for the non-figure nodes. Therefore, this replaces it by the title node.
Feature or Bugfix