Skip to content

Commit 5f34a6d

Browse files
committed
Revamp testing
1 parent 3af26bc commit 5f34a6d

File tree

30 files changed

+331
-188
lines changed

30 files changed

+331
-188
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
build
22
dist
33
test-output
4-
*.egg-info
5-
__pycache__
4+
*.egg*
65
docs/.doctrees

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ dist:
66
install:
77
pip install -r requirements.txt
88
pip uninstall -y sphinx-tabs
9-
python setup.py install
9+
python -B setup.py install
1010

1111
test:
1212
rm -rf out
13+
python -B setup.py test
1314
pip install pep8 pylint
1415
pep8 sphinx_tabs/tabs.py
1516
pylint --rcfile=pylint.cfg sphinx_tabs/tabs.py
16-
test/run.sh
1717

1818
docs:
1919
rm -rf docs

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
version = '1.1.6',
66
author = 'djungelorm',
77
author_email = 'djungelorm@users.noreply.github.com',
8-
packages = ['sphinx_tabs'],
8+
packages = ['sphinx_tabs', 'sphinx_tabs.test'],
9+
test_suite='sphinx_tabs.test',
910
package_data = {
1011
'sphinx_tabs': [
1112
'tabs.js',
@@ -17,6 +18,7 @@
1718
license = 'MIT',
1819
description = 'Tab views for Sphinx',
1920
install_requires = ['sphinx>=1.2'],
21+
tests_require = ['sphinx>=1.6', 'docutils', 'pygments', 'sphinx_testing', 'lxml'],
2022
classifiers=[
2123
'Development Status :: 5 - Production/Stable',
2224
'Environment :: Plugins',

sphinx_tabs/test/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
File renamed without changes.

sphinx_tabs/test/basic/index.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<div class="sphinx-tabs docutils container">
2+
<div class="ui top attached tabular menu sphinx-menu docutils container">
3+
<div class="active item sphinx-data-tab-0 docutils container">
4+
<div class="docutils container">
5+
Apples</div>
6+
</div>
7+
<div class="item sphinx-data-tab-1 docutils container">
8+
<div class="docutils container">
9+
Pears</div>
10+
</div>
11+
<div class="item sphinx-data-tab-2 docutils container">
12+
<div class="docutils container">
13+
Oranges</div>
14+
</div>
15+
</div>
16+
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-0 active docutils container">
17+
Apples are green, or sometimes red.</div>
18+
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-1 docutils container">
19+
Pears are green.</div>
20+
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-2 docutils container">
21+
Oranges are orange.</div>
22+
</div>

sphinx_tabs/test/basic/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. tabs::
2+
3+
.. tab:: Apples
4+
5+
Apples are green, or sometimes red.
6+
7+
.. tab:: Pears
8+
9+
Pears are green.
10+
11+
.. tab:: Oranges
12+
13+
Oranges are orange.
File renamed without changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<div class="toctree-wrapper compound">
2+
<ul>
3+
<li class="toctree-l1">
4+
<a class="reference internal" href="other.html">Another page without tabs</a>
5+
</li>
6+
<li class="toctree-l1">
7+
<a class="reference internal" href="other2.html">And another page without tabs</a>
8+
</li>
9+
</ul>
10+
</div>
File renamed without changes.

0 commit comments

Comments
 (0)