-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
docs warnings as errors and initial page similar to README #1848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -711,31 +711,26 @@ class Metafunc(fixtures.FuncargnamesCompatAttr): | |
They help to inspect a test function and to generate tests according to | ||
test configuration or values specified in the class or module where a | ||
test function is defined. | ||
|
||
:ivar fixturenames: set of fixture names required by the test function | ||
|
||
:ivar function: underlying python test function | ||
|
||
:ivar cls: class object where the test function is defined in or ``None``. | ||
|
||
:ivar module: the module object where the test function is defined in. | ||
|
||
:ivar config: access to the :class:`_pytest.config.Config` object for the | ||
test session. | ||
|
||
:ivar funcargnames: | ||
.. deprecated:: 2.3 | ||
Use ``fixturenames`` instead. | ||
""" | ||
def __init__(self, function, fixtureinfo, config, cls=None, module=None): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had to change from docstring to inline comments because of sphinx-doc/sphinx#2549. 😞 |
||
#: access to the :class:`_pytest.config.Config` object for the test session | ||
self.config = config | ||
|
||
#: the module object where the test function is defined in. | ||
self.module = module | ||
|
||
#: underlying python test function | ||
self.function = function | ||
|
||
#: set of fixture names required by the test function | ||
self.fixturenames = fixtureinfo.names_closure | ||
self._arg2fixturedefs = fixtureinfo.name2fixturedefs | ||
|
||
#: class object where the test function is defined in or ``None``. | ||
self.cls = cls | ||
|
||
self._calls = [] | ||
self._ids = py.builtin.set() | ||
self._arg2fixturedefs = fixtureinfo.name2fixturedefs | ||
|
||
def parametrize(self, argnames, argvalues, indirect=False, ids=None, | ||
scope=None): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
:orphan: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be good to add a comment: From the sphinx docs:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No problem |
||
|
||
.. warnings about this file not being included in any toctree will be suppressed by :orphan: | ||
|
||
|
||
April 2015 is "adopt pytest month" | ||
============================================= | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,8 +39,6 @@ Over 20 participants took part from 4 continents, including employees | |
from Splunk, Personalkollen, Cobe.io, FanDuel and Dolby. Some newcomers | ||
mixed with developers who have worked on pytest since its beginning, and | ||
of course everyone in between. | ||
Ana Ribeiro, Brazil | ||
Ronny Pfannschmidt, Germany | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where did we go ^^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it was decided to remove the entire participants list at some point, but those two names seem to be have left by accident (they were a syntax error in Sphinx) |
||
|
||
Sprint organisation, schedule | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -208,6 +208,7 @@ It is possible to add your own detailed explanations by implementing | |
the ``pytest_assertrepr_compare`` hook. | ||
|
||
.. autofunction:: _pytest.hookspec.pytest_assertrepr_compare | ||
:noindex: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suspect this caused a warning? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, because it had the same directive elsewhere and Sphinx complained about which one to add to its main index. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, fair enough |
||
|
||
As an example consider adding the following hook in a conftest.py which | ||
provides an alternative explanation for ``Foo`` objects:: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,7 +127,7 @@ | |
|
||
# The name for this set of Sphinx documents. If None, it defaults to | ||
# "<project> v<release> documentation". | ||
html_title = None | ||
html_title = 'pytest documentation' | ||
|
||
# A shorter title for the navigation bar. Default is the same as html_title. | ||
html_short_title = "pytest-%s" % release | ||
|
@@ -144,7 +144,7 @@ | |
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ['_static'] | ||
# html_static_path = ['_static'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need this anymore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's no There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, cool |
||
|
||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | ||
# using the given strftime format. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,32 +10,51 @@ Full pytest documentation | |
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
overview | ||
apiref | ||
example/index | ||
getting-started | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added all files which were not in any table of contents here (#1112), and suggestions on how to order these topics are welcome. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i recall @pfctdayelise working on the structure, perhaps we can use the pictures and merge the docs branch also how far are those appart There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure, I thought they meant a complete overhaul of the docs, including rewriting sections. Here I was interested in getting zero warnings, and to do that I had to include all documents in the table of contents, but which is something we already had agreed would be for the best (flat better than nested, etc) |
||
usage | ||
assert | ||
builtin | ||
fixture | ||
monkeypatch | ||
tmpdir | ||
capture | ||
recwarn | ||
doctest | ||
mark | ||
skipping | ||
parametrize | ||
cache | ||
plugins | ||
unittest | ||
nose | ||
xunit_setup | ||
plugins | ||
writing_plugins | ||
|
||
example/index | ||
goodpractices | ||
customize | ||
bash-completion | ||
|
||
backwards-compatibility | ||
license | ||
contributing | ||
talks | ||
projects | ||
faq | ||
contact | ||
|
||
.. only:: html | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
funcarg_compare | ||
announce/index | ||
|
||
.. only:: html | ||
|
||
.. toctree:: | ||
:hidden: | ||
:maxdepth: 1 | ||
|
||
changelog | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍