Skip to content

Commit c87f86c

Browse files
committed
Update XML expectations for Docutils 0.22
1 parent 1df38a8 commit c87f86c

10 files changed

+87
-83
lines changed

tests/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import pytest
33
from pathlib import Path
44
from bs4 import BeautifulSoup
5+
import docutils
56
import sphinx
67

78
from sphinx_tabs.tabs import JS_FILES, CSS_FILES
@@ -128,6 +129,9 @@ def read(app, docname="index", resolve=False, regress=False, replace=None):
128129
'<document source="index.rst">',
129130
"<document source=\"index.rst\" translation_progress=\"{'total': 0, 'translated': 0}\">",
130131
)
132+
if docutils.__version_info__ < (0, 22):
133+
text = text.replace('="False"', '="0"')
134+
text = text.replace('linenos="True"', 'linenos="1"')
131135
file_regression.check(text, extension=extension)
132136

133137
return doctree

tests/test_build/test_conditional_assets_html_assets_policy_index_.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<document source="index.rst" translation_progress="{'total': 0, 'translated': 0}">
22
<compound classes="toctree-wrapper">
3-
<toctree caption="True" entries="(None,\ 'no_tabs1') (None,\ 'no_tabs2')" glob="False" hidden="False" includefiles="no_tabs1 no_tabs2" includehidden="False" maxdepth="-1" numbered="0" parent="index" rawentries="" titlesonly="False">
3+
<toctree caption="True" entries="(None,\ 'no_tabs1') (None,\ 'no_tabs2')" glob="0" hidden="0" includefiles="no_tabs1 no_tabs2" includehidden="0" maxdepth="-1" numbered="0" parent="index" rawentries="" titlesonly="0">
44
<section ids="fruits" names="fruits">
55
<title>
66
Fruits
@@ -54,22 +54,22 @@
5454
<button aria-controls="panel-2-Rm9ydHJhbg==" aria-selected="false" classes="sphinx-tabs-tab code-tab group-tab" ids="tab-2-Rm9ydHJhbg==" name="Rm9ydHJhbg==" role="tab" tabindex="-1">
5555
Fortran
5656
<div aria-labelledby="tab-2-Qw==" classes="sphinx-tabs-panel code-tab group-tab" ids="panel-2-Qw==" name="Qw==" role="tabpanel" tabindex="0">
57-
<literal_block force="False" highlight_args="{}" language="c" xml:space="preserve">
57+
<literal_block force="0" highlight_args="{}" language="c" xml:space="preserve">
5858
C Main Function
5959
<div aria-labelledby="tab-2-Qysr" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-2-Qysr" name="Qysr" role="tabpanel" tabindex="0">
60-
<literal_block force="False" highlight_args="{}" language="c++" xml:space="preserve">
60+
<literal_block force="0" highlight_args="{}" language="c++" xml:space="preserve">
6161
C++ Main Function
6262
<div aria-labelledby="tab-2-UHl0aG9u" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-2-UHl0aG9u" name="UHl0aG9u" role="tabpanel" tabindex="0">
63-
<literal_block force="False" highlight_args="{}" language="py" xml:space="preserve">
63+
<literal_block force="0" highlight_args="{}" language="py" xml:space="preserve">
6464
Python Main Function
6565
<div aria-labelledby="tab-2-SmF2YQ==" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-2-SmF2YQ==" name="SmF2YQ==" role="tabpanel" tabindex="0">
66-
<literal_block force="False" highlight_args="{}" language="java" xml:space="preserve">
66+
<literal_block force="0" highlight_args="{}" language="java" xml:space="preserve">
6767
Java Main Function
6868
<div aria-labelledby="tab-2-SnVsaWE=" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-2-SnVsaWE=" name="SnVsaWE=" role="tabpanel" tabindex="0">
69-
<literal_block force="False" highlight_args="{}" language="julia" xml:space="preserve">
69+
<literal_block force="0" highlight_args="{}" language="julia" xml:space="preserve">
7070
Julia Main Function
7171
<div aria-labelledby="tab-2-Rm9ydHJhbg==" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-2-Rm9ydHJhbg==" name="Rm9ydHJhbg==" role="tabpanel" tabindex="0">
72-
<literal_block force="False" highlight_args="{}" language="fortran" xml:space="preserve">
72+
<literal_block force="0" highlight_args="{}" language="fortran" xml:space="preserve">
7373
Fortran Main Function
7474
<container classes="sphinx-tabs" type="tab-element">
7575
<div aria-label="Tabbed content" classes="closeable" role="tablist">
@@ -86,31 +86,31 @@
8686
<button aria-controls="panel-3-Rm9ydHJhbg==" aria-selected="false" classes="sphinx-tabs-tab code-tab group-tab" ids="tab-3-Rm9ydHJhbg==" name="Rm9ydHJhbg==" role="tab" tabindex="-1">
8787
Fortran
8888
<div aria-labelledby="tab-3-Qw==" classes="sphinx-tabs-panel code-tab group-tab" ids="panel-3-Qw==" name="Qw==" role="tabpanel" tabindex="0">
89-
<literal_block force="False" highlight_args="{}" language="c" xml:space="preserve">
89+
<literal_block force="0" highlight_args="{}" language="c" xml:space="preserve">
9090
int main(const int argc, const char **argv) {
9191
return 0;
9292
}
9393
<div aria-labelledby="tab-3-Qysr" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-3-Qysr" name="Qysr" role="tabpanel" tabindex="0">
94-
<literal_block force="False" highlight_args="{}" language="c++" xml:space="preserve">
94+
<literal_block force="0" highlight_args="{}" language="c++" xml:space="preserve">
9595
int main(const int argc, const char **argv) {
9696
return 0;
9797
}
9898
<div aria-labelledby="tab-3-UHl0aG9u" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-3-UHl0aG9u" name="UHl0aG9u" role="tabpanel" tabindex="0">
99-
<literal_block force="False" highlight_args="{}" language="py" xml:space="preserve">
99+
<literal_block force="0" highlight_args="{}" language="py" xml:space="preserve">
100100
def main():
101101
return
102102
<div aria-labelledby="tab-3-SmF2YQ==" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-3-SmF2YQ==" name="SmF2YQ==" role="tabpanel" tabindex="0">
103-
<literal_block force="False" highlight_args="{}" language="java" xml:space="preserve">
103+
<literal_block force="0" highlight_args="{}" language="java" xml:space="preserve">
104104
class Main {
105105
public static void main(String[] args) {
106106
}
107107
}
108108
<div aria-labelledby="tab-3-SnVsaWE=" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-3-SnVsaWE=" name="SnVsaWE=" role="tabpanel" tabindex="0">
109-
<literal_block force="False" highlight_args="{}" language="julia" xml:space="preserve">
109+
<literal_block force="0" highlight_args="{}" language="julia" xml:space="preserve">
110110
function main()
111111
end
112112
<div aria-labelledby="tab-3-Rm9ydHJhbg==" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-3-Rm9ydHJhbg==" name="Rm9ydHJhbg==" role="tabpanel" tabindex="0">
113-
<literal_block force="False" highlight_args="{}" language="fortran" xml:space="preserve">
113+
<literal_block force="0" highlight_args="{}" language="fortran" xml:space="preserve">
114114
PROGRAM main
115115
END PROGRAM main
116116
<section ids="group-tabs" names="group\ tabs">

tests/test_build/test_conditional_assets_html_assets_policy_no_tabs1_.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<document source="index.rst" translation_progress="{'total': 0, 'translated': 0}">
22
<compound classes="toctree-wrapper">
3-
<toctree caption="True" entries="(None,\ 'no_tabs1') (None,\ 'no_tabs2')" glob="False" hidden="False" includefiles="no_tabs1 no_tabs2" includehidden="False" maxdepth="-1" numbered="0" parent="index" rawentries="" titlesonly="False">
3+
<toctree caption="True" entries="(None,\ 'no_tabs1') (None,\ 'no_tabs2')" glob="0" hidden="0" includefiles="no_tabs1 no_tabs2" includehidden="0" maxdepth="-1" numbered="0" parent="index" rawentries="" titlesonly="0">
44
<section ids="fruits" names="fruits">
55
<title>
66
Fruits
@@ -54,22 +54,22 @@
5454
<button aria-controls="panel-2-Rm9ydHJhbg==" aria-selected="false" classes="sphinx-tabs-tab code-tab group-tab" ids="tab-2-Rm9ydHJhbg==" name="Rm9ydHJhbg==" role="tab" tabindex="-1">
5555
Fortran
5656
<div aria-labelledby="tab-2-Qw==" classes="sphinx-tabs-panel code-tab group-tab" ids="panel-2-Qw==" name="Qw==" role="tabpanel" tabindex="0">
57-
<literal_block force="False" highlight_args="{}" language="c" xml:space="preserve">
57+
<literal_block force="0" highlight_args="{}" language="c" xml:space="preserve">
5858
C Main Function
5959
<div aria-labelledby="tab-2-Qysr" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-2-Qysr" name="Qysr" role="tabpanel" tabindex="0">
60-
<literal_block force="False" highlight_args="{}" language="c++" xml:space="preserve">
60+
<literal_block force="0" highlight_args="{}" language="c++" xml:space="preserve">
6161
C++ Main Function
6262
<div aria-labelledby="tab-2-UHl0aG9u" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-2-UHl0aG9u" name="UHl0aG9u" role="tabpanel" tabindex="0">
63-
<literal_block force="False" highlight_args="{}" language="py" xml:space="preserve">
63+
<literal_block force="0" highlight_args="{}" language="py" xml:space="preserve">
6464
Python Main Function
6565
<div aria-labelledby="tab-2-SmF2YQ==" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-2-SmF2YQ==" name="SmF2YQ==" role="tabpanel" tabindex="0">
66-
<literal_block force="False" highlight_args="{}" language="java" xml:space="preserve">
66+
<literal_block force="0" highlight_args="{}" language="java" xml:space="preserve">
6767
Java Main Function
6868
<div aria-labelledby="tab-2-SnVsaWE=" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-2-SnVsaWE=" name="SnVsaWE=" role="tabpanel" tabindex="0">
69-
<literal_block force="False" highlight_args="{}" language="julia" xml:space="preserve">
69+
<literal_block force="0" highlight_args="{}" language="julia" xml:space="preserve">
7070
Julia Main Function
7171
<div aria-labelledby="tab-2-Rm9ydHJhbg==" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-2-Rm9ydHJhbg==" name="Rm9ydHJhbg==" role="tabpanel" tabindex="0">
72-
<literal_block force="False" highlight_args="{}" language="fortran" xml:space="preserve">
72+
<literal_block force="0" highlight_args="{}" language="fortran" xml:space="preserve">
7373
Fortran Main Function
7474
<container classes="sphinx-tabs" type="tab-element">
7575
<div aria-label="Tabbed content" classes="closeable" role="tablist">
@@ -86,31 +86,31 @@
8686
<button aria-controls="panel-3-Rm9ydHJhbg==" aria-selected="false" classes="sphinx-tabs-tab code-tab group-tab" ids="tab-3-Rm9ydHJhbg==" name="Rm9ydHJhbg==" role="tab" tabindex="-1">
8787
Fortran
8888
<div aria-labelledby="tab-3-Qw==" classes="sphinx-tabs-panel code-tab group-tab" ids="panel-3-Qw==" name="Qw==" role="tabpanel" tabindex="0">
89-
<literal_block force="False" highlight_args="{}" language="c" xml:space="preserve">
89+
<literal_block force="0" highlight_args="{}" language="c" xml:space="preserve">
9090
int main(const int argc, const char **argv) {
9191
return 0;
9292
}
9393
<div aria-labelledby="tab-3-Qysr" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-3-Qysr" name="Qysr" role="tabpanel" tabindex="0">
94-
<literal_block force="False" highlight_args="{}" language="c++" xml:space="preserve">
94+
<literal_block force="0" highlight_args="{}" language="c++" xml:space="preserve">
9595
int main(const int argc, const char **argv) {
9696
return 0;
9797
}
9898
<div aria-labelledby="tab-3-UHl0aG9u" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-3-UHl0aG9u" name="UHl0aG9u" role="tabpanel" tabindex="0">
99-
<literal_block force="False" highlight_args="{}" language="py" xml:space="preserve">
99+
<literal_block force="0" highlight_args="{}" language="py" xml:space="preserve">
100100
def main():
101101
return
102102
<div aria-labelledby="tab-3-SmF2YQ==" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-3-SmF2YQ==" name="SmF2YQ==" role="tabpanel" tabindex="0">
103-
<literal_block force="False" highlight_args="{}" language="java" xml:space="preserve">
103+
<literal_block force="0" highlight_args="{}" language="java" xml:space="preserve">
104104
class Main {
105105
public static void main(String[] args) {
106106
}
107107
}
108108
<div aria-labelledby="tab-3-SnVsaWE=" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-3-SnVsaWE=" name="SnVsaWE=" role="tabpanel" tabindex="0">
109-
<literal_block force="False" highlight_args="{}" language="julia" xml:space="preserve">
109+
<literal_block force="0" highlight_args="{}" language="julia" xml:space="preserve">
110110
function main()
111111
end
112112
<div aria-labelledby="tab-3-Rm9ydHJhbg==" classes="sphinx-tabs-panel code-tab group-tab" hidden="true" ids="panel-3-Rm9ydHJhbg==" name="Rm9ydHJhbg==" role="tabpanel" tabindex="0">
113-
<literal_block force="False" highlight_args="{}" language="fortran" xml:space="preserve">
113+
<literal_block force="0" highlight_args="{}" language="fortran" xml:space="preserve">
114114
PROGRAM main
115115
END PROGRAM main
116116
<section ids="group-tabs" names="group\ tabs">

0 commit comments

Comments
 (0)