Skip to content

Commit 6759b04

Browse files
authored
Merge pull request #1789 from nicoddemus/regendoc-take-2
Regendoc take 2
2 parents 6e3105d + 8b8c698 commit 6759b04

File tree

7 files changed

+19
-18
lines changed

7 files changed

+19
-18
lines changed

doc/en/assert.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ the conftest file::
246246
f1 = Foo(1)
247247
f2 = Foo(2)
248248
> assert f1 == f2
249-
E AssertionError
249+
E assert Comparing Foo instances:
250+
E vals: 1 != 2
250251
251252
test_foocompare.py:11: AssertionError
252253
1 failed in 0.12 seconds

doc/en/cache.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ If you then run it with ``--lf``::
110110
E Failed: bad luck
111111
112112
test_50.py:6: Failed
113+
======= 48 tests deselected ========
113114
======= 2 failed, 48 deselected in 0.12 seconds ========
114115

115116
You have run only the two failing test from the last run, while 48 tests have

doc/en/capture.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ that performs some output related checks:
9797
out, err = capsys.readouterr()
9898
assert out == "hello\n"
9999
assert err == "world\n"
100-
print "next"
100+
print ("next")
101101
out, err = capsys.readouterr()
102102
assert out == "next\n"
103103

doc/en/example/markers.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ You can then restrict a test run to only run tests marked with ``webtest``::
3838
3939
test_server.py::test_send_http PASSED
4040
41-
======= 3 tests deselected by "-m 'webtest'" ========
41+
======= 3 tests deselected ========
4242
======= 1 passed, 3 deselected in 0.12 seconds ========
4343

4444
Or the inverse, running all tests except the webtest ones::
@@ -54,7 +54,7 @@ Or the inverse, running all tests except the webtest ones::
5454
test_server.py::test_another PASSED
5555
test_server.py::TestClass::test_method PASSED
5656
57-
======= 1 tests deselected by "-m 'not webtest'" ========
57+
======= 1 tests deselected ========
5858
======= 3 passed, 1 deselected in 0.12 seconds ========
5959

6060
Selecting tests based on their node ID
@@ -137,7 +137,7 @@ select tests based on their names::
137137
138138
test_server.py::test_send_http PASSED
139139
140-
======= 3 tests deselected by '-khttp' ========
140+
======= 3 tests deselected ========
141141
======= 1 passed, 3 deselected in 0.12 seconds ========
142142

143143
And you can also run all tests except the ones that match the keyword::
@@ -153,7 +153,7 @@ And you can also run all tests except the ones that match the keyword::
153153
test_server.py::test_another PASSED
154154
test_server.py::TestClass::test_method PASSED
155155
156-
======= 1 tests deselected by '-knot send_http' ========
156+
======= 1 tests deselected ========
157157
======= 3 passed, 1 deselected in 0.12 seconds ========
158158

159159
Or to select "http" and "quick" tests::
@@ -168,7 +168,7 @@ Or to select "http" and "quick" tests::
168168
test_server.py::test_send_http PASSED
169169
test_server.py::test_something_quick PASSED
170170
171-
======= 2 tests deselected by '-khttp or quick' ========
171+
======= 2 tests deselected ========
172172
======= 2 passed, 2 deselected in 0.12 seconds ========
173173

174174
.. note::
@@ -505,7 +505,7 @@ Note that if you specify a platform via the marker-command line option like this
505505
506506
test_plat.py s
507507
508-
======= 3 tests deselected by "-m 'linux2'" ========
508+
======= 3 tests deselected ========
509509
======= 1 skipped, 3 deselected in 0.12 seconds ========
510510

511511
then the unmarked-tests will not be run. It is thus a way to restrict the run to the specific tests.
@@ -566,7 +566,7 @@ We can now use the ``-m option`` to select one set::
566566
test_module.py:6: in test_interface_complex
567567
assert 0
568568
E assert 0
569-
======= 2 tests deselected by "-m 'interface'" ========
569+
======= 2 tests deselected ========
570570
======= 2 failed, 2 deselected in 0.12 seconds ========
571571

572572
or to select both "event" and "interface" tests::
@@ -592,5 +592,5 @@ or to select both "event" and "interface" tests::
592592
test_module.py:9: in test_event_simple
593593
assert 0
594594
E assert 0
595-
======= 1 tests deselected by "-m 'interface or event'" ========
595+
======= 1 tests deselected ========
596596
======= 3 failed, 1 deselected in 0.12 seconds ========

doc/en/example/multipython.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import pytest
77
import _pytest._code
88

9-
pythonlist = ['python2.6', 'python2.7', 'python3.3']
9+
pythonlist = ['python2.6', 'python2.7', 'python3.4', 'python3.5']
1010
@pytest.fixture(params=pythonlist)
1111
def python1(request, tmpdir):
1212
picklefile = tmpdir.join("data.pickle")

doc/en/example/parametrize.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ parametrizer`_ but in a lot less code::
346346
def pytest_generate_tests(metafunc):
347347
# called once per each test function
348348
funcarglist = metafunc.cls.params[metafunc.function.__name__]
349-
argnames = list(funcarglist[0])
349+
argnames = sorted(funcarglist[0])
350350
metafunc.parametrize(argnames, [[funcargs[name] for name in argnames]
351351
for funcargs in funcarglist])
352352

@@ -369,7 +369,7 @@ argument sets to use for each test function. Let's run it::
369369
$ pytest -q
370370
F..
371371
======= FAILURES ========
372-
_______ TestClass.test_equals[2-1] ________
372+
_______ TestClass.test_equals[1-2] ________
373373
374374
self = <test_parametrize.TestClass object at 0xdeadbeef>, a = 1, b = 2
375375
@@ -397,11 +397,10 @@ is to be run with different sets of arguments for its three arguments:
397397
Running it results in some skips if we don't have all the python interpreters installed and otherwise runs all combinations (5 interpreters times 5 interpreters times 3 objects to serialize/deserialize)::
398398

399399
. $ pytest -rs -q multipython.py
400-
ssssssssssss...ssssssssssss
400+
sssssssssssssss.........sss.........sss.........
401401
======= short test summary info ========
402-
SKIP [12] $REGENDOC_TMPDIR/CWD/multipython.py:23: 'python3.3' not found
403-
SKIP [12] $REGENDOC_TMPDIR/CWD/multipython.py:23: 'python2.6' not found
404-
3 passed, 24 skipped in 0.12 seconds
402+
SKIP [21] $REGENDOC_TMPDIR/CWD/multipython.py:23: 'python2.6' not found
403+
27 passed, 21 skipped in 0.12 seconds
405404

406405
Indirect parametrization of optional implementations/imports
407406
--------------------------------------------------------------------

doc/en/example/simple.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ We can run this::
501501
file $REGENDOC_TMPDIR/b/test_error.py, line 1
502502
def test_root(db): # no db here, will error out
503503
E fixture 'db' not found
504-
available fixtures: monkeypatch, capfd, recwarn, pytestconfig, tmpdir_factory, tmpdir, cache, capsys, record_xml_property, doctest_namespace
504+
available fixtures: cache, capfd, capsys, doctest_namespace, monkeypatch, pytestconfig, record_xml_property, recwarn, tmpdir, tmpdir_factory
505505
use 'pytest --fixtures [testpath]' for help on them.
506506
507507
$REGENDOC_TMPDIR/b/test_error.py:1

0 commit comments

Comments
 (0)