Skip to content

Commit e75078e

Browse files
authored
Merge pull request #1848 from pytest-dev/doc-warnings
docs warnings as errors and initial page similar to README
2 parents cb7c472 + 519f02b commit e75078e

32 files changed

+236
-360
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ env:
2626
- TESTENV=py27-nobyte
2727
- TESTENV=doctesting
2828
- TESTENV=freeze
29+
- TESTENV=docs
2930

3031
script: tox --recreate -e $TESTENV
3132

README.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ To execute it::
3535

3636
$ pytest
3737
======= test session starts ========
38-
platform linux -- Python 3.4.3, pytest-2.8.5, py-1.4.31, pluggy-0.3.1
3938
collected 1 items
4039

4140
test_sample.py F
@@ -52,7 +51,7 @@ To execute it::
5251
======= 1 failed in 0.12 seconds ========
5352

5453

55-
Due to ``py.test``'s detailed assertion introspection, only plain ``assert`` statements are used. See `getting-started <http://docs.pytest.org/en/latest/getting-started.html#our-first-test-run>`_ for more examples.
54+
Due to ``pytest``'s detailed assertion introspection, only plain ``assert`` statements are used. See `getting-started <http://docs.pytest.org/en/latest/getting-started.html#our-first-test-run>`_ for more examples.
5655

5756

5857
Features
@@ -64,7 +63,7 @@ Features
6463
<http://docs.pytest.org/en/latest/goodpractices.html#python-test-discovery>`_
6564
of test modules and functions;
6665

67-
- `Modular fixtures <http://docs.pytest.org/en/latest/fixture.html>`_ for
66+
- `Modular fixtures <http://docs.pytest.org/en/latest/fixture.html>`_ for
6867
managing small or parametrized long-lived test resources;
6968

7069
- Can run `unittest <http://docs.pytest.org/en/latest/unittest.html>`_ (or trial),

_pytest/python.py

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -711,31 +711,26 @@ class Metafunc(fixtures.FuncargnamesCompatAttr):
711711
They help to inspect a test function and to generate tests according to
712712
test configuration or values specified in the class or module where a
713713
test function is defined.
714-
715-
:ivar fixturenames: set of fixture names required by the test function
716-
717-
:ivar function: underlying python test function
718-
719-
:ivar cls: class object where the test function is defined in or ``None``.
720-
721-
:ivar module: the module object where the test function is defined in.
722-
723-
:ivar config: access to the :class:`_pytest.config.Config` object for the
724-
test session.
725-
726-
:ivar funcargnames:
727-
.. deprecated:: 2.3
728-
Use ``fixturenames`` instead.
729714
"""
730715
def __init__(self, function, fixtureinfo, config, cls=None, module=None):
716+
#: access to the :class:`_pytest.config.Config` object for the test session
731717
self.config = config
718+
719+
#: the module object where the test function is defined in.
732720
self.module = module
721+
722+
#: underlying python test function
733723
self.function = function
724+
725+
#: set of fixture names required by the test function
734726
self.fixturenames = fixtureinfo.names_closure
735-
self._arg2fixturedefs = fixtureinfo.name2fixturedefs
727+
728+
#: class object where the test function is defined in or ``None``.
736729
self.cls = cls
730+
737731
self._calls = []
738732
self._ids = py.builtin.set()
733+
self._arg2fixturedefs = fixtureinfo.name2fixturedefs
739734

740735
def parametrize(self, argnames, argvalues, indirect=False, ids=None,
741736
scope=None):

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
# builds timing out in AppVeyor
1111
- TOXENV: "linting,py26,py27,py33,py34,py35,pypy"
1212
- TOXENV: "py27-pexpect,py27-xdist,py27-trial,py35-pexpect,py35-xdist,py35-trial"
13-
- TOXENV: "py27-nobyte,doctesting,freeze"
13+
- TOXENV: "py27-nobyte,doctesting,freeze,docs"
1414

1515
install:
1616
- echo Installed Pythons

doc/en/adopt.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
:orphan:
2+
3+
.. warnings about this file not being included in any toctree will be suppressed by :orphan:
4+
15
26
April 2015 is "adopt pytest month"
37
=============================================

doc/en/announce/release-2.9.1.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,5 @@ The py.test Development Team
6363
.. _#649: https://github.com/pytest-dev/pytest/issues/649
6464

6565
.. _@asottile: https://github.com/asottile
66+
.. _@nicoddemus: https://github.com/nicoddemus
67+
.. _@tomviner: https://github.com/tomviner

doc/en/announce/release-2.9.2.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,10 @@ The py.test Development Team
6969
.. _#1496: https://github.com/pytest-dev/pytest/issue/1496
7070
.. _#1524: https://github.com/pytest-dev/pytest/issue/1524
7171

72-
.. _@prusse-martin: https://github.com/prusse-martin
7372
.. _@astraw38: https://github.com/astraw38
73+
.. _@hackebrot: https://github.com/hackebrot
74+
.. _@omarkohl: https://github.com/omarkohl
75+
.. _@pquentin: https://github.com/pquentin
76+
.. _@prusse-martin: https://github.com/prusse-martin
77+
.. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt
78+
.. _@tomviner: https://github.com/tomviner

doc/en/announce/sprint2016.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ Over 20 participants took part from 4 continents, including employees
3939
from Splunk, Personalkollen, Cobe.io, FanDuel and Dolby. Some newcomers
4040
mixed with developers who have worked on pytest since its beginning, and
4141
of course everyone in between.
42-
Ana Ribeiro, Brazil
43-
Ronny Pfannschmidt, Germany
4442

4543

4644
Sprint organisation, schedule

doc/en/assert.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ It is possible to add your own detailed explanations by implementing
208208
the ``pytest_assertrepr_compare`` hook.
209209

210210
.. autofunction:: _pytest.hookspec.pytest_assertrepr_compare
211+
:noindex:
211212

212213
As an example consider adding the following hook in a conftest.py which
213214
provides an alternative explanation for ``Foo`` objects::

doc/en/builtin.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ Fixtures and requests
5858

5959
To mark a fixture function:
6060

61-
.. autofunction:: _pytest.python.fixture
61+
.. autofunction:: _pytest.fixtures.fixture
6262

6363
Tutorial at :ref:`fixtures`.
6464

6565
The ``request`` object that can be used from fixture functions.
6666

67-
.. autoclass:: _pytest.python.FixtureRequest()
67+
.. autoclass:: _pytest.fixtures.FixtureRequest()
6868
:members:
6969

7070

0 commit comments

Comments
 (0)