Skip to content

Commit da5eff4

Browse files
committed
Test with multiple versions
1 parent ed82e79 commit da5eff4

21 files changed

+375
-6
lines changed

.circleci/config.yml

+9
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ jobs:
1717
- run: pip install --user tox
1818
- run: tox -e py36,codecov
1919

20+
sphinx-tests:
21+
docker:
22+
- image: 'cimg/python:3.6'
23+
steps:
24+
- checkout
25+
- run: pip install --user tox
26+
- run: tox -c sphinx-tox.ini
27+
2028
checks:
2129
docker:
2230
- image: 'cimg/python:3.6'
@@ -45,3 +53,4 @@ workflows:
4553
jobs:
4654
- checks
4755
- tests
56+
- sphinx-tests

pytest.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[pytest]
22
addopts = --reuse-db --strict-markers
33
markers =
4-
sphinx
4+
sphinxtest
55
search
66
proxito
77
python_files = tests.py test_*.py *_tests.py

readthedocs/conftest.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import pytest
22
from rest_framework.test import APIClient
33

4+
pytest_plugins = 'sphinx.testing.fixtures'
5+
46
@pytest.fixture
57
def api_client():
68
return APIClient()

readthedocs/embed/tests/data/sphinx/bibtex/page.html

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- Extracted from https://sphinxcontrib-bibtex.readthedocs.io/en/latest/quickstart.html -->
12
<div class="section" id="getting-started">
23
<h1>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline"></a></h1>
34
<div class="section" id="overview">

readthedocs/embed/tests/data/sphinx/glossary/page.html

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- Extracted from https://www.sphinx-doc.org/en/master/glossary.html -->
12
<div class="section" id="glossary">
23
<span id="id1"></span>
34
<h1>Glossary<a class="headerlink" href="#glossary" title="Permalink to this headline"></a></h1>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extensions = [
2+
"readthedocs_ext.readthedocs",
3+
'sphinx.ext.autosectionlabel',
4+
]
5+
project = "Test"
6+
master_doc = "index"
7+
exclude_patterns = ["out"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Glossary
2+
========
3+
4+
.. glossary::
5+
6+
builder
7+
A class (inheriting from :class:`~sphinx.builders.Builder`) that takes
8+
parsed documents and performs an action on them. Normally, builders
9+
translate the documents to an output format, but it is also possible to
10+
use builders that e.g. check for broken links in the documentation, or
11+
build coverage information.
12+
13+
See :doc:`/usage` for an overview over Sphinx's built-in
14+
builders.
15+
16+
configuration directory
17+
The directory containing :file:`conf.py`. By default, this is the same as
18+
the :term:`builder`, but can be set differently with the **-c**
19+
command-line option.
20+
21+
directive
22+
A reStructuredText markup element that allows marking a block of content
23+
with special meaning. Directives are supplied not only by docutils, but
24+
Sphinx and custom extensions can add their own. The basic directive
25+
syntax looks like this:
26+
27+
.. sourcecode:: rst
28+
29+
.. directivename:: argument ...
30+
:option: value
31+
32+
Content of the directive.
33+
34+
See :ref:`index:Another title` for more information.
35+
36+
environment
37+
A structure where information about all documents under the root is saved,
38+
and used for cross-referencing. The environment is pickled after the
39+
parsing stage, so that successive runs only need to read and parse new and
40+
changed documents.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Title
2+
=====
3+
4+
`Read the Docs`_ hosts documentation for the open source community.
5+
6+
.. _Read the Docs: https://readthedocs.org
7+
8+
The main documentation for the site is organized into a couple sections:
9+
10+
.. toctree::
11+
:maxdepth: 2
12+
13+
/usage
14+
/glossary
15+
16+
Subtitle
17+
--------
18+
19+
See :term:`builder` for more information.
20+
21+
Sub-sub title
22+
`````````````
23+
24+
Here is my content.
25+
26+
- One
27+
- Two
28+
- Three
29+
30+
Another title
31+
-------------
32+
33+
.. code-block:: python
34+
35+
print("Hello world!")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<div class="section" id="glossary">
2+
<h1>Glossary<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#glossary" title="Permalink to this headline"></a></h1>
3+
<dl class="glossary">
4+
<dt id="term-builder">builder<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#term-builder" title="Permalink to this term"></a></dt><dd><p>A class (inheriting from <code class="xref py py-class docutils literal notranslate"><span class="pre">Builder</span></code>) that takes
5+
parsed documents and performs an action on them. Normally, builders
6+
translate the documents to an output format, but it is also possible to
7+
use builders that e.g. check for broken links in the documentation, or
8+
build coverage information.</p>
9+
<p>See <a class="reference internal" href="http://project.readthedocs.io/en/latest/usage.html"><span class="doc">Usage</span></a> for an overview over Sphinx’s built-in
10+
builders.</p>
11+
</dd>
12+
<dt id="term-configuration-directory">configuration directory<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#term-configuration-directory" title="Permalink to this term"></a></dt><dd><p>The directory containing <code class="file docutils literal notranslate"><span class="pre">conf.py</span></code>. By default, this is the same as
13+
the <a class="reference internal" href="http://project.readthedocs.io/en/latest/index.html#term-builder"><span class="xref std std-term">builder</span></a>, but can be set differently with the <strong>-c</strong>
14+
command-line option.</p>
15+
</dd>
16+
<dt id="term-directive">directive<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#term-directive" title="Permalink to this term"></a></dt><dd><p>A reStructuredText markup element that allows marking a block of content
17+
with special meaning. Directives are supplied not only by docutils, but
18+
Sphinx and custom extensions can add their own. The basic directive
19+
syntax looks like this:</p>
20+
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">directivename</span><span class="p">::</span> argument ...
21+
<span class="nc">:option:</span> value
22+
23+
Content of the directive.
24+
</pre></div>
25+
</div>
26+
<p>See <span class="xref std std-ref">index:Another title</span> for more information.</p>
27+
</dd>
28+
<dt id="term-environment">environment<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#term-environment" title="Permalink to this term"></a></dt><dd><p>A structure where information about all documents under the root is saved,
29+
and used for cross-referencing. The environment is pickled after the
30+
parsing stage, so that successive runs only need to read and parse new and
31+
changed documents.</p>
32+
</dd>
33+
</dl>
34+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<dd><p>A class (inheriting from <code class="xref py py-class docutils literal notranslate"><span class="pre">Builder</span></code>) that takes
2+
parsed documents and performs an action on them. Normally, builders
3+
translate the documents to an output format, but it is also possible to
4+
use builders that e.g. check for broken links in the documentation, or
5+
build coverage information.</p>
6+
<p>See <a class="reference internal" href="http://project.readthedocs.io/en/latest/usage.html"><span class="doc">Usage</span></a> for an overview over Sphinx’s built-in
7+
builders.</p>
8+
</dd>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<dd><p>The directory containing <code class="file docutils literal notranslate"><span class="pre">conf.py</span></code>. By default, this is the same as
2+
the <a class="reference internal" href="http://project.readthedocs.io/en/latest/index.html#term-builder"><span class="xref std std-term">builder</span></a>, but can be set differently with the <strong>-c</strong>
3+
command-line option.</p>
4+
</dd>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<dd><p>A reStructuredText markup element that allows marking a block of content
2+
with special meaning. Directives are supplied not only by docutils, but
3+
Sphinx and custom extensions can add their own. The basic directive
4+
syntax looks like this:</p>
5+
<div class="highlight-rst notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">directivename</span><span class="p">::</span> argument ...
6+
<span class="nc">:option:</span> value
7+
8+
Content of the directive.
9+
</pre></div>
10+
</div>
11+
<p>See <span class="xref std std-ref">index:Another title</span> for more information.</p>
12+
</dd>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<dd><p>A structure where information about all documents under the root is saved,
2+
and used for cross-referencing. The environment is pickled after the
3+
parsing stage, so that successive runs only need to read and parse new and
4+
changed documents.</p>
5+
</dd>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<div class="section" id="another-title">
2+
<h2>Another title<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#another-title" title="Permalink to this headline"></a></h2>
3+
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Hello world!&quot;</span><span class="p">)</span>
4+
</pre></div>
5+
</div>
6+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div class="section" id="sub-sub-title">
2+
<h3>Sub-sub title<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#sub-sub-title" title="Permalink to this headline"></a></h3>
3+
<p>Here is my content.</p>
4+
<ul class="simple">
5+
<li><p>One</p></li>
6+
<li><p>Two</p></li>
7+
<li><p>Three</p></li>
8+
</ul>
9+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="section" id="subtitle">
2+
<h2>Subtitle<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#subtitle" title="Permalink to this headline"></a></h2>
3+
<p>See <a class="reference internal" href="http://project.readthedocs.io/en/latest/glossary.html#term-builder"><span class="xref std std-term">builder</span></a> for more information.</p>
4+
<div class="section" id="sub-sub-title">
5+
<h3>Sub-sub title<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#sub-sub-title" title="Permalink to this headline"></a></h3>
6+
<p>Here is my content.</p>
7+
<ul class="simple">
8+
<li><p>One</p></li>
9+
<li><p>Two</p></li>
10+
<li><p>Three</p></li>
11+
</ul>
12+
</div>
13+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<div class="section" id="title">
2+
<h1>Title<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#title" title="Permalink to this headline"></a></h1>
3+
<p><a class="reference external" href="https://readthedocs.org">Read the Docs</a> hosts documentation for the open source community.</p>
4+
<p>The main documentation for the site is organized into a couple sections:</p>
5+
<div class="toctree-wrapper compound">
6+
<ul>
7+
<li class="toctree-l1"><a class="reference internal" href="http://project.readthedocs.io/en/latest/usage.html">Usage</a></li>
8+
<li class="toctree-l1"><a class="reference internal" href="http://project.readthedocs.io/en/latest/glossary.html">Glossary</a></li>
9+
</ul>
10+
</div>
11+
<div class="section" id="subtitle">
12+
<h2>Subtitle<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#subtitle" title="Permalink to this headline"></a></h2>
13+
<p>See <a class="reference internal" href="http://project.readthedocs.io/en/latest/glossary.html#term-builder"><span class="xref std std-term">builder</span></a> for more information.</p>
14+
<div class="section" id="sub-sub-title">
15+
<h3>Sub-sub title<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#sub-sub-title" title="Permalink to this headline"></a></h3>
16+
<p>Here is my content.</p>
17+
<ul class="simple">
18+
<li><p>One</p></li>
19+
<li><p>Two</p></li>
20+
<li><p>Three</p></li>
21+
</ul>
22+
</div>
23+
</div>
24+
<div class="section" id="another-title">
25+
<h2>Another title<a class="headerlink" href="http://project.readthedocs.io/en/latest/index.html#another-title" title="Permalink to this headline"></a></h2>
26+
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Hello world!&quot;</span><span class="p">)</span>
27+
</pre></div>
28+
</div>
29+
</div>
30+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Usage
2+
=====
3+
4+
Here are some usage examples.

0 commit comments

Comments
 (0)