Skip to content

Commit 86d7a1a

Browse files
committed
Change test to use independent root
1 parent 88b5dfb commit 86d7a1a

File tree

5 files changed

+144
-1
lines changed

5 files changed

+144
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
project = "sphinx-tabs test"
2+
master_doc = "index"
3+
source_suffix = ".rst"
4+
extensions = ["sphinx_tabs.tabs"]
5+
pygments_style = "sphinx"
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
.. toctree::
2+
3+
no_tabs1
4+
no_tabs2
5+
6+
Fruits
7+
========================================
8+
9+
.. tabs::
10+
11+
.. tab:: Apples
12+
13+
Apples are green, or sometimes red.
14+
15+
.. tab:: Pears
16+
17+
Pears are green.
18+
19+
.. tab:: Oranges
20+
21+
Oranges are orange.
22+
23+
Luminaries
24+
========================================
25+
26+
.. tabs::
27+
28+
.. tab:: Sun
29+
30+
The sun is a star.
31+
32+
.. tab:: Moon
33+
34+
The moon is not a star.
35+
36+
Code Tabs
37+
========================================
38+
39+
.. tabs::
40+
41+
.. code-tab:: c
42+
43+
C Main Function
44+
45+
.. code-tab:: c++
46+
47+
C++ Main Function
48+
49+
.. code-tab:: py
50+
51+
Python Main Function
52+
53+
.. code-tab:: java
54+
55+
Java Main Function
56+
57+
.. code-tab:: julia
58+
59+
Julia Main Function
60+
61+
.. code-tab:: fortran
62+
63+
Fortran Main Function
64+
65+
.. tabs::
66+
67+
.. code-tab:: c
68+
69+
int main(const int argc, const char **argv) {
70+
return 0;
71+
}
72+
73+
.. code-tab:: c++
74+
75+
int main(const int argc, const char **argv) {
76+
return 0;
77+
}
78+
79+
.. code-tab:: py
80+
81+
def main():
82+
return
83+
84+
.. code-tab:: java
85+
86+
class Main {
87+
public static void main(String[] args) {
88+
}
89+
}
90+
91+
.. code-tab:: julia
92+
93+
function main()
94+
end
95+
96+
.. code-tab:: fortran
97+
98+
PROGRAM main
99+
END PROGRAM main
100+
101+
Group Tabs
102+
========================================
103+
104+
.. tabs::
105+
106+
.. group-tab:: Linux
107+
108+
Linux Line 1
109+
110+
.. group-tab:: Mac OSX
111+
112+
Mac OSX Line 1
113+
114+
.. group-tab:: Windows
115+
116+
Windows Line 1
117+
118+
.. tabs::
119+
120+
.. group-tab:: Linux
121+
122+
Linux Line 2
123+
124+
.. group-tab:: Mac OSX
125+
126+
Mac OSX Line 2
127+
128+
.. group-tab:: Windows
129+
130+
Windows Line 2
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Another page without tabs
2+
========================================
3+
4+
No tabs to see here
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
And another page without tabs
2+
========================================
3+
4+
No tabs to see here either

tests/test_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_conditional_assets(app, docname, check_asset_links):
2727

2828
@pytest.mark.noautobuild
2929
@pytest.mark.parametrize("docname", ["index", "no_tabs1", "no_tabs2"])
30-
@pytest.mark.sphinx(testroot="conditionalassets")
30+
@pytest.mark.sphinx(testroot="conditionalassets-policy")
3131
@pytest.mark.skipif(
3232
sphinx.version_info[:2] < (4, 1), reason="Test uses Sphinx 4.1 config"
3333
)

0 commit comments

Comments
 (0)