pytest-sphinx 0.6.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,28 @@
1
+
2
+ Copyright (c) 2017-2024, Thomas Wimmer
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ * Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ * Neither the name of pytest-sphinx nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.1
2
+ Name: pytest-sphinx
3
+ Version: 0.6.2
4
+ Summary: Doctest plugin for pytest with support for Sphinx-specific doctest-directives
5
+ Author-email: Thomas Wimmer <thomaswimmer@posteo.com>
6
+ Maintainer-email: Thomas Wimmer <thomaswimmer@posteo.com>
7
+ License:
8
+ Copyright (c) 2017-2024, Thomas Wimmer
9
+ All rights reserved.
10
+
11
+ Redistribution and use in source and binary forms, with or without
12
+ modification, are permitted provided that the following conditions are met:
13
+
14
+ * Redistributions of source code must retain the above copyright notice, this
15
+ list of conditions and the following disclaimer.
16
+
17
+ * Redistributions in binary form must reproduce the above copyright notice,
18
+ this list of conditions and the following disclaimer in the documentation
19
+ and/or other materials provided with the distribution.
20
+
21
+ * Neither the name of pytest-sphinx nor the names of its
22
+ contributors may be used to endorse or promote products derived from
23
+ this software without specific prior written permission.
24
+
25
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
29
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
+
36
+ Project-URL: homepage, https://github.com/thisch/pytest-sphinx
37
+ Keywords: sphinx,pytest,rst
38
+ Classifier: Development Status :: 4 - Beta
39
+ Classifier: Framework :: Pytest
40
+ Classifier: Intended Audience :: Developers
41
+ Classifier: Topic :: Software Development :: Testing
42
+ Classifier: Programming Language :: Python
43
+ Classifier: Programming Language :: Python :: 3
44
+ Classifier: Programming Language :: Python :: 3.8
45
+ Classifier: Programming Language :: Python :: 3.9
46
+ Classifier: Programming Language :: Python :: 3.10
47
+ Classifier: Programming Language :: Python :: 3.11
48
+ Classifier: Programming Language :: Python :: 3.12
49
+ Classifier: Programming Language :: Python :: Implementation :: CPython
50
+ Classifier: Operating System :: OS Independent
51
+ Classifier: License :: OSI Approved :: BSD License
52
+ Requires-Python: >=3.8
53
+ Description-Content-Type: text/x-rst
54
+ License-File: LICENSE
55
+ Requires-Dist: pytest>=8.0.0
56
+ Provides-Extra: lint
57
+ Requires-Dist: isort>=5; extra == "lint"
58
+ Requires-Dist: flake8; extra == "lint"
59
+ Requires-Dist: black; extra == "lint"
60
+ Requires-Dist: mypy; extra == "lint"
61
+
62
+ =============
63
+ pytest-sphinx
64
+ =============
65
+
66
+ .. image:: https://github.com/thisch/pytest-sphinx/workflows/Test/badge.svg
67
+ :target: https://github.com/thisch/pytest-sphinx/actions
68
+ :alt: Action Status
69
+
70
+ A doctest plugin for pytest, which understands the sphinx-specific
71
+ directives from `doctest-sphinx`_. Those sphinx-specific directives can be
72
+ used in rst files as well as in docstrings of python modules.
73
+
74
+
75
+ Features
76
+ --------
77
+
78
+ * support for the ``doctest`` directive
79
+ * support for ``testcode`` and ``testoutput`` directives
80
+ * support for ``testsetup`` and ``testcleanup`` is planned (pull-requests welcome)
81
+ * support for parsing global optionflags (``doctest_optionflags``) from
82
+ ``pytest.ini``
83
+ * support for ``:options:`` in ``testoutput``
84
+ * support for ``:skipif:`` in ``testcode`` and in ``testoutput``
85
+ * ``:hide:`` is ignored by "pytest-sphinx"
86
+
87
+
88
+ Requirements
89
+ ------------
90
+
91
+ * pytest
92
+
93
+
94
+ Installation
95
+ ------------
96
+
97
+ You can install "pytest-sphinx" via `pip`_ from `PyPI`_::
98
+
99
+ $ pip install pytest-sphinx
100
+
101
+
102
+ Usage
103
+ -----
104
+
105
+ * See `doctest-sphinx`_. Have a look at the examples in `doctest-examples`_.
106
+ * Run pytest with the `--doctest-modules` flag.
107
+
108
+
109
+ Contributing
110
+ ------------
111
+ Contributions are very welcome. Tests can be run with `tox`_, please ensure
112
+ the coverage at least stays the same before you submit a pull request.
113
+
114
+
115
+ License
116
+ -------
117
+
118
+ Distributed under the terms of the `BSD-3`_ license, "pytest-sphinx" is free and open source software
119
+
120
+
121
+ Issues
122
+ ------
123
+
124
+ If you encounter any problems, please `file an issue`_ along with a detailed description.
125
+
126
+ .. _`doctest-sphinx`: http://www.sphinx-doc.org/en/stable/ext/doctest.html
127
+ .. _`doctest-examples`: https://github.com/sphinx-doc/sphinx/blob/master/tests/roots/test-ext-doctest/doctest.txt
128
+ .. _`@hackebrot`: https://github.com/hackebrot
129
+ .. _`MIT`: http://opensource.org/licenses/MIT
130
+ .. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause
131
+ .. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt
132
+ .. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0
133
+ .. _`file an issue`: https://github.com/thisch/pytest-sphinx/issues
134
+ .. _`pytest`: https://github.com/pytest-dev/pytest
135
+ .. _`tox`: https://tox.readthedocs.io/en/latest/
136
+ .. _`pip`: https://pypi.python.org/pypi/pip/
137
+ .. _`PyPI`: https://pypi.python.org/pypi
@@ -0,0 +1,76 @@
1
+ =============
2
+ pytest-sphinx
3
+ =============
4
+
5
+ .. image:: https://github.com/thisch/pytest-sphinx/workflows/Test/badge.svg
6
+ :target: https://github.com/thisch/pytest-sphinx/actions
7
+ :alt: Action Status
8
+
9
+ A doctest plugin for pytest, which understands the sphinx-specific
10
+ directives from `doctest-sphinx`_. Those sphinx-specific directives can be
11
+ used in rst files as well as in docstrings of python modules.
12
+
13
+
14
+ Features
15
+ --------
16
+
17
+ * support for the ``doctest`` directive
18
+ * support for ``testcode`` and ``testoutput`` directives
19
+ * support for ``testsetup`` and ``testcleanup`` is planned (pull-requests welcome)
20
+ * support for parsing global optionflags (``doctest_optionflags``) from
21
+ ``pytest.ini``
22
+ * support for ``:options:`` in ``testoutput``
23
+ * support for ``:skipif:`` in ``testcode`` and in ``testoutput``
24
+ * ``:hide:`` is ignored by "pytest-sphinx"
25
+
26
+
27
+ Requirements
28
+ ------------
29
+
30
+ * pytest
31
+
32
+
33
+ Installation
34
+ ------------
35
+
36
+ You can install "pytest-sphinx" via `pip`_ from `PyPI`_::
37
+
38
+ $ pip install pytest-sphinx
39
+
40
+
41
+ Usage
42
+ -----
43
+
44
+ * See `doctest-sphinx`_. Have a look at the examples in `doctest-examples`_.
45
+ * Run pytest with the `--doctest-modules` flag.
46
+
47
+
48
+ Contributing
49
+ ------------
50
+ Contributions are very welcome. Tests can be run with `tox`_, please ensure
51
+ the coverage at least stays the same before you submit a pull request.
52
+
53
+
54
+ License
55
+ -------
56
+
57
+ Distributed under the terms of the `BSD-3`_ license, "pytest-sphinx" is free and open source software
58
+
59
+
60
+ Issues
61
+ ------
62
+
63
+ If you encounter any problems, please `file an issue`_ along with a detailed description.
64
+
65
+ .. _`doctest-sphinx`: http://www.sphinx-doc.org/en/stable/ext/doctest.html
66
+ .. _`doctest-examples`: https://github.com/sphinx-doc/sphinx/blob/master/tests/roots/test-ext-doctest/doctest.txt
67
+ .. _`@hackebrot`: https://github.com/hackebrot
68
+ .. _`MIT`: http://opensource.org/licenses/MIT
69
+ .. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause
70
+ .. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt
71
+ .. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0
72
+ .. _`file an issue`: https://github.com/thisch/pytest-sphinx/issues
73
+ .. _`pytest`: https://github.com/pytest-dev/pytest
74
+ .. _`tox`: https://tox.readthedocs.io/en/latest/
75
+ .. _`pip`: https://pypi.python.org/pypi/pip/
76
+ .. _`PyPI`: https://pypi.python.org/pypi
@@ -0,0 +1,61 @@
1
+ [project]
2
+ name = "pytest-sphinx"
3
+ version = "0.6.2"
4
+ description = "Doctest plugin for pytest with support for Sphinx-specific doctest-directives"
5
+ readme = "README.rst"
6
+ requires-python = ">=3.8"
7
+ license = { file = "LICENSE" }
8
+ keywords = ["sphinx", "pytest", "rst"]
9
+ authors = [
10
+ { name="Thomas Wimmer", email="thomaswimmer@posteo.com" }
11
+ ]
12
+ maintainers = [
13
+ { name="Thomas Wimmer", email="thomaswimmer@posteo.com" }
14
+ ]
15
+
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Framework :: Pytest",
19
+ "Intended Audience :: Developers",
20
+ "Topic :: Software Development :: Testing",
21
+ "Programming Language :: Python",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.8",
24
+ "Programming Language :: Python :: 3.9",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Programming Language :: Python :: Implementation :: CPython",
29
+ "Operating System :: OS Independent",
30
+ "License :: OSI Approved :: BSD License",
31
+ ]
32
+
33
+ # Requirements
34
+ dependencies = [
35
+ "pytest >=8.0.0",
36
+ ]
37
+
38
+ [project.optional-dependencies]
39
+ lint = [
40
+ "isort >= 5",
41
+ "flake8",
42
+ "black",
43
+ "mypy"
44
+ ]
45
+
46
+ [project.urls]
47
+ homepage = "https://github.com/thisch/pytest-sphinx"
48
+
49
+ [project.entry-points."pytest11"]
50
+ "sphinx" = "pytest_sphinx"
51
+
52
+ [tool.isort]
53
+ profile = "black"
54
+
55
+ [tool.mypy]
56
+ strict = true
57
+ warn_unused_ignores = false # mypy#8823
58
+
59
+ [build-system]
60
+ requires = ["setuptools"]
61
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,9 @@
1
+ [flake8]
2
+ exclude = .*/,.tox,*.egg
3
+ max-line-length = 88
4
+ extend-ignore = E203
5
+
6
+ [egg_info]
7
+ tag_build =
8
+ tag_date = 0
9
+
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.1
2
+ Name: pytest-sphinx
3
+ Version: 0.6.2
4
+ Summary: Doctest plugin for pytest with support for Sphinx-specific doctest-directives
5
+ Author-email: Thomas Wimmer <thomaswimmer@posteo.com>
6
+ Maintainer-email: Thomas Wimmer <thomaswimmer@posteo.com>
7
+ License:
8
+ Copyright (c) 2017-2024, Thomas Wimmer
9
+ All rights reserved.
10
+
11
+ Redistribution and use in source and binary forms, with or without
12
+ modification, are permitted provided that the following conditions are met:
13
+
14
+ * Redistributions of source code must retain the above copyright notice, this
15
+ list of conditions and the following disclaimer.
16
+
17
+ * Redistributions in binary form must reproduce the above copyright notice,
18
+ this list of conditions and the following disclaimer in the documentation
19
+ and/or other materials provided with the distribution.
20
+
21
+ * Neither the name of pytest-sphinx nor the names of its
22
+ contributors may be used to endorse or promote products derived from
23
+ this software without specific prior written permission.
24
+
25
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
29
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
+
36
+ Project-URL: homepage, https://github.com/thisch/pytest-sphinx
37
+ Keywords: sphinx,pytest,rst
38
+ Classifier: Development Status :: 4 - Beta
39
+ Classifier: Framework :: Pytest
40
+ Classifier: Intended Audience :: Developers
41
+ Classifier: Topic :: Software Development :: Testing
42
+ Classifier: Programming Language :: Python
43
+ Classifier: Programming Language :: Python :: 3
44
+ Classifier: Programming Language :: Python :: 3.8
45
+ Classifier: Programming Language :: Python :: 3.9
46
+ Classifier: Programming Language :: Python :: 3.10
47
+ Classifier: Programming Language :: Python :: 3.11
48
+ Classifier: Programming Language :: Python :: 3.12
49
+ Classifier: Programming Language :: Python :: Implementation :: CPython
50
+ Classifier: Operating System :: OS Independent
51
+ Classifier: License :: OSI Approved :: BSD License
52
+ Requires-Python: >=3.8
53
+ Description-Content-Type: text/x-rst
54
+ License-File: LICENSE
55
+ Requires-Dist: pytest>=8.0.0
56
+ Provides-Extra: lint
57
+ Requires-Dist: isort>=5; extra == "lint"
58
+ Requires-Dist: flake8; extra == "lint"
59
+ Requires-Dist: black; extra == "lint"
60
+ Requires-Dist: mypy; extra == "lint"
61
+
62
+ =============
63
+ pytest-sphinx
64
+ =============
65
+
66
+ .. image:: https://github.com/thisch/pytest-sphinx/workflows/Test/badge.svg
67
+ :target: https://github.com/thisch/pytest-sphinx/actions
68
+ :alt: Action Status
69
+
70
+ A doctest plugin for pytest, which understands the sphinx-specific
71
+ directives from `doctest-sphinx`_. Those sphinx-specific directives can be
72
+ used in rst files as well as in docstrings of python modules.
73
+
74
+
75
+ Features
76
+ --------
77
+
78
+ * support for the ``doctest`` directive
79
+ * support for ``testcode`` and ``testoutput`` directives
80
+ * support for ``testsetup`` and ``testcleanup`` is planned (pull-requests welcome)
81
+ * support for parsing global optionflags (``doctest_optionflags``) from
82
+ ``pytest.ini``
83
+ * support for ``:options:`` in ``testoutput``
84
+ * support for ``:skipif:`` in ``testcode`` and in ``testoutput``
85
+ * ``:hide:`` is ignored by "pytest-sphinx"
86
+
87
+
88
+ Requirements
89
+ ------------
90
+
91
+ * pytest
92
+
93
+
94
+ Installation
95
+ ------------
96
+
97
+ You can install "pytest-sphinx" via `pip`_ from `PyPI`_::
98
+
99
+ $ pip install pytest-sphinx
100
+
101
+
102
+ Usage
103
+ -----
104
+
105
+ * See `doctest-sphinx`_. Have a look at the examples in `doctest-examples`_.
106
+ * Run pytest with the `--doctest-modules` flag.
107
+
108
+
109
+ Contributing
110
+ ------------
111
+ Contributions are very welcome. Tests can be run with `tox`_, please ensure
112
+ the coverage at least stays the same before you submit a pull request.
113
+
114
+
115
+ License
116
+ -------
117
+
118
+ Distributed under the terms of the `BSD-3`_ license, "pytest-sphinx" is free and open source software
119
+
120
+
121
+ Issues
122
+ ------
123
+
124
+ If you encounter any problems, please `file an issue`_ along with a detailed description.
125
+
126
+ .. _`doctest-sphinx`: http://www.sphinx-doc.org/en/stable/ext/doctest.html
127
+ .. _`doctest-examples`: https://github.com/sphinx-doc/sphinx/blob/master/tests/roots/test-ext-doctest/doctest.txt
128
+ .. _`@hackebrot`: https://github.com/hackebrot
129
+ .. _`MIT`: http://opensource.org/licenses/MIT
130
+ .. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause
131
+ .. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt
132
+ .. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0
133
+ .. _`file an issue`: https://github.com/thisch/pytest-sphinx/issues
134
+ .. _`pytest`: https://github.com/pytest-dev/pytest
135
+ .. _`tox`: https://tox.readthedocs.io/en/latest/
136
+ .. _`pip`: https://pypi.python.org/pypi/pip/
137
+ .. _`PyPI`: https://pypi.python.org/pypi
@@ -0,0 +1,16 @@
1
+ LICENSE
2
+ README.rst
3
+ pyproject.toml
4
+ setup.cfg
5
+ src/pytest_sphinx.py
6
+ src/pytest_sphinx.egg-info/PKG-INFO
7
+ src/pytest_sphinx.egg-info/SOURCES.txt
8
+ src/pytest_sphinx.egg-info/dependency_links.txt
9
+ src/pytest_sphinx.egg-info/entry_points.txt
10
+ src/pytest_sphinx.egg-info/requires.txt
11
+ src/pytest_sphinx.egg-info/top_level.txt
12
+ tests/test_doc2test.py
13
+ tests/test_options.py
14
+ tests/test_python_files.py
15
+ tests/test_sphinx_doctest.py
16
+ tests/test_text_files.py
@@ -0,0 +1,2 @@
1
+ [pytest11]
2
+ sphinx = pytest_sphinx
@@ -0,0 +1,7 @@
1
+ pytest>=8.0.0
2
+
3
+ [lint]
4
+ isort>=5
5
+ flake8
6
+ black
7
+ mypy
@@ -0,0 +1 @@
1
+ pytest_sphinx