Skip to content

Commit 662d755

Browse files
fix documentation gegeneration, kill Makefile
1 parent bf9b945 commit 662d755

21 files changed

+213
-198
lines changed

Makefile

-31
This file was deleted.

doc/en/Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ PAPEROPT_a4 = -D latex_paper_size=a4
1212
PAPEROPT_letter = -D latex_paper_size=letter
1313
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1414

15+
REGENDOC_ARGS := \
16+
--normalize "/={8,} (.*) ={8,}/======= \1 ========/" \
17+
--normalize "/_{8,} (.*) _{8,}/_______ \1 ________/" \
18+
--normalize "/in \d+.\d+ seconds/in 0.12 seconds/" \
19+
--normalize "@/tmp/pytest-of-.*/pytest-\d+@PYTEST_TMPDIR@" \
20+
21+
1522

1623
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
1724

@@ -46,7 +53,7 @@ installall: clean install installpdf
4653
@echo "done"
4754

4855
regen:
49-
PYTHONDONTWRITEBYTECODE=1 COLUMNS=76 regendoc --update *.rst */*.rst
56+
PYTHONDONTWRITEBYTECODE=1 COLUMNS=76 regendoc --update *.rst */*.rst ${REGENDOC_ARGS}
5057

5158
html:
5259
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

doc/en/assert.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ you will see the return value of the function call::
2626

2727
$ py.test test_assert1.py
2828
======= test session starts ========
29-
platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0
29+
platform linux2 -- Python 2.7.10, pytest-2.8.0, py-1.4.30, pluggy-0.3.1
3030
rootdir: $REGENDOC_TMPDIR, inifile:
3131
collected 1 items
3232
@@ -146,7 +146,7 @@ if you run this module::
146146

147147
$ py.test test_assert2.py
148148
======= test session starts ========
149-
platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0
149+
platform linux2 -- Python 2.7.10, pytest-2.8.0, py-1.4.30, pluggy-0.3.1
150150
rootdir: $REGENDOC_TMPDIR, inifile:
151151
collected 1 items
152152
@@ -225,7 +225,7 @@ the conftest file::
225225
E assert Comparing Foo instances:
226226
E vals: 1 != 2
227227
228-
test_foocompare.py:8: AssertionError
228+
test_foocompare.py:11: AssertionError
229229
1 failed in 0.12 seconds
230230

231231
.. _assert-details:

doc/en/builtin.rst

+8
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ You can ask for available builtin or project-custom
7373
:ref:`fixtures <fixtures>` by typing::
7474

7575
$ py.test -q --fixtures
76+
cache
77+
/home/private/Projects/pytest-dev/pytest/.tox/regen/lib/python2.7/site-packages/_pytest/cacheprovider.py:176: no docstring available
7678
capsys
7779
enables capturing of writes to sys.stdout/sys.stderr and makes
7880
captured output available via ``capsys.readouterr()`` method calls
@@ -81,6 +83,10 @@ You can ask for available builtin or project-custom
8183
enables capturing of writes to file descriptors 1 and 2 and makes
8284
captured output available via ``capfd.readouterr()`` method calls
8385
which return a ``(out, err)`` tuple.
86+
record_xml_property
87+
Fixture that adds extra xml properties to the tag for the calling test.
88+
The fixture is callable with (name, value), with value being automatically
89+
xml-encoded.
8490
monkeypatch
8591
The returned ``monkeypatch`` funcarg provides these
8692
helper methods to modify objects, dictionaries or os.environ::
@@ -108,6 +114,8 @@ You can ask for available builtin or project-custom
108114
109115
See http://docs.python.org/library/warnings.html for information
110116
on warning categories.
117+
tmpdir_factory
118+
Return a TempdirFactory instance for the test session.
111119
tmpdir
112120
return a temporary directory path object
113121
which is unique to each test function invocation,

doc/en/cache.rst

+30-30
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ If you run this for the first time you will see two failures::
4444

4545
$ py.test -q
4646
.................F.......F........................
47-
================================= FAILURES =================================
48-
_______________________________ test_num[17] _______________________________
47+
======= FAILURES ========
48+
_______ test_num[17] ________
4949
5050
i = 17
5151
@@ -56,7 +56,7 @@ If you run this for the first time you will see two failures::
5656
E Failed: bad luck
5757
5858
test_50.py:6: Failed
59-
_______________________________ test_num[25] _______________________________
59+
_______ test_num[25] ________
6060
6161
i = 25
6262
@@ -67,21 +67,21 @@ If you run this for the first time you will see two failures::
6767
E Failed: bad luck
6868
6969
test_50.py:6: Failed
70-
2 failed, 48 passed in 0.04 seconds
70+
2 failed, 48 passed in 0.12 seconds
7171

7272
If you then run it with ``--lf``::
7373

7474
$ py.test --lf
75-
=========================== test session starts ============================
76-
platform linux2 -- Python 2.7.6, pytest-2.7.3.dev428+ng79d22bf.d20150916, py-1.4.30, pluggy-0.3.0
75+
======= test session starts ========
76+
platform linux2 -- Python 2.7.10, pytest-2.8.0, py-1.4.30, pluggy-0.3.1
7777
run-last-failure: rerun last 2 failures
78-
rootdir: /tmp/doc-exec-94, inifile:
78+
rootdir: $REGENDOC_TMPDIR, inifile:
7979
collected 50 items
8080
8181
test_50.py FF
8282
83-
================================= FAILURES =================================
84-
_______________________________ test_num[17] _______________________________
83+
======= FAILURES ========
84+
_______ test_num[17] ________
8585
8686
i = 17
8787
@@ -92,7 +92,7 @@ If you then run it with ``--lf``::
9292
E Failed: bad luck
9393
9494
test_50.py:6: Failed
95-
_______________________________ test_num[25] _______________________________
95+
_______ test_num[25] ________
9696
9797
i = 25
9898
@@ -103,7 +103,7 @@ If you then run it with ``--lf``::
103103
E Failed: bad luck
104104
105105
test_50.py:6: Failed
106-
================= 2 failed, 48 deselected in 0.01 seconds ==================
106+
======= 2 failed, 48 deselected in 0.12 seconds ========
107107

108108
You have run only the two failing test from the last run, while 48 tests have
109109
not been run ("deselected").
@@ -113,16 +113,16 @@ previous failures will be executed first (as can be seen from the series
113113
of ``FF`` and dots)::
114114

115115
$ py.test --ff
116-
=========================== test session starts ============================
117-
platform linux2 -- Python 2.7.6, pytest-2.7.3.dev428+ng79d22bf.d20150916, py-1.4.30, pluggy-0.3.0
116+
======= test session starts ========
117+
platform linux2 -- Python 2.7.10, pytest-2.8.0, py-1.4.30, pluggy-0.3.1
118118
run-last-failure: rerun last 2 failures first
119-
rootdir: /tmp/doc-exec-94, inifile:
119+
rootdir: $REGENDOC_TMPDIR, inifile:
120120
collected 50 items
121121
122122
test_50.py FF................................................
123123
124-
================================= FAILURES =================================
125-
_______________________________ test_num[17] _______________________________
124+
======= FAILURES ========
125+
_______ test_num[17] ________
126126
127127
i = 17
128128
@@ -133,7 +133,7 @@ of ``FF`` and dots)::
133133
E Failed: bad luck
134134
135135
test_50.py:6: Failed
136-
_______________________________ test_num[25] _______________________________
136+
_______ test_num[25] ________
137137
138138
i = 25
139139
@@ -144,7 +144,7 @@ of ``FF`` and dots)::
144144
E Failed: bad luck
145145
146146
test_50.py:6: Failed
147-
=================== 2 failed, 48 passed in 0.03 seconds ====================
147+
======= 2 failed, 48 passed in 0.12 seconds ========
148148

149149
.. _`config.cache`:
150150

@@ -179,8 +179,8 @@ of the sleep::
179179

180180
$ py.test -q
181181
F
182-
================================= FAILURES =================================
183-
______________________________ test_function _______________________________
182+
======= FAILURES ========
183+
_______ test_function ________
184184
185185
mydata = 42
186186
@@ -189,15 +189,15 @@ of the sleep::
189189
E assert 42 == 23
190190
191191
test_caching.py:14: AssertionError
192-
1 failed in 5.41 seconds
192+
1 failed in 0.12 seconds
193193

194194
If you run it a second time the value will be retrieved from
195195
the cache and this will be quick::
196196

197197
$ py.test -q
198198
F
199-
================================= FAILURES =================================
200-
______________________________ test_function _______________________________
199+
======= FAILURES ========
200+
_______ test_function ________
201201
202202
mydata = 42
203203
@@ -206,7 +206,7 @@ the cache and this will be quick::
206206
E assert 42 == 23
207207
208208
test_caching.py:14: AssertionError
209-
1 failed in 0.01 seconds
209+
1 failed in 0.12 seconds
210210

211211
See the `cache-api`_ for more details.
212212

@@ -218,15 +218,15 @@ You can always peek at the content of the cache using the
218218
``--cache-clear`` command line option::
219219

220220
$ py.test --cache-clear
221-
=========================== test session starts ============================
222-
platform linux2 -- Python 2.7.6, pytest-2.7.3.dev428+ng79d22bf.d20150916, py-1.4.30, pluggy-0.3.0
223-
rootdir: /tmp/doc-exec-94, inifile:
221+
======= test session starts ========
222+
platform linux2 -- Python 2.7.10, pytest-2.8.0, py-1.4.30, pluggy-0.3.1
223+
rootdir: $REGENDOC_TMPDIR, inifile:
224224
collected 1 items
225225
226226
test_caching.py F
227227
228-
================================= FAILURES =================================
229-
______________________________ test_function _______________________________
228+
======= FAILURES ========
229+
_______ test_function ________
230230
231231
mydata = 42
232232
@@ -235,7 +235,7 @@ You can always peek at the content of the cache using the
235235
E assert 42 == 23
236236
237237
test_caching.py:14: AssertionError
238-
========================= 1 failed in 5.41 seconds =========================
238+
======= 1 failed in 0.12 seconds ========
239239

240240
Clearing Cache content
241241
-------------------------------

doc/en/capture.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ of the failing function and hide the other one::
6464

6565
$ py.test
6666
======= test session starts ========
67-
platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0
67+
platform linux2 -- Python 2.7.10, pytest-2.8.0, py-1.4.30, pluggy-0.3.1
6868
rootdir: $REGENDOC_TMPDIR, inifile:
6969
collected 2 items
7070
@@ -78,7 +78,7 @@ of the failing function and hide the other one::
7878
E assert False
7979
8080
test_module.py:9: AssertionError
81-
---------------------------- Captured stdout setup -----------------------------
81+
-------------------------- Captured stdout setup ---------------------------
8282
setting up <function test_func2 at 0xdeadbeef>
8383
======= 1 failed, 1 passed in 0.12 seconds ========
8484

doc/en/doctest.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ then you can just invoke ``py.test`` without command line options::
4646

4747
$ py.test
4848
======= test session starts ========
49-
platform linux2 -- Python 2.7.9, pytest-2.8.0.dev4, py-1.4.28, pluggy-0.3.0
49+
platform linux2 -- Python 2.7.10, pytest-2.8.0, py-1.4.30, pluggy-0.3.1
5050
rootdir: $REGENDOC_TMPDIR, inifile: pytest.ini
5151
collected 1 items
5252

0 commit comments

Comments
 (0)