Skip to content

Commit befc8a3

Browse files
committed
1 parent 5935fba commit befc8a3

20 files changed

+86
-164
lines changed

doc/en/assert.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ you will see the return value of the function call:
3030
=========================== test session starts ============================
3131
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
3232
cachedir: $PYTHON_PREFIX/.pytest_cache
33-
rootdir: $REGENDOC_TMPDIR
33+
rootdir: /home/sweet/project
3434
collected 1 item
3535
3636
test_assert1.py F [100%]
@@ -165,7 +165,7 @@ if you run this module:
165165
=========================== test session starts ============================
166166
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
167167
cachedir: $PYTHON_PREFIX/.pytest_cache
168-
rootdir: $REGENDOC_TMPDIR
168+
rootdir: /home/sweet/project
169169
collected 1 item
170170
171171
test_assert2.py F [100%]

doc/en/cache.rst

Lines changed: 7 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ If you then run it with ``--lf``:
8282
=========================== test session starts ============================
8383
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
8484
cachedir: $PYTHON_PREFIX/.pytest_cache
85-
rootdir: $REGENDOC_TMPDIR
85+
rootdir: /home/sweet/project
8686
collected 50 items / 48 deselected / 2 selected
8787
run-last-failure: rerun previous 2 failures
8888
@@ -126,7 +126,7 @@ of ``FF`` and dots):
126126
=========================== test session starts ============================
127127
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
128128
cachedir: $PYTHON_PREFIX/.pytest_cache
129-
rootdir: $REGENDOC_TMPDIR
129+
rootdir: /home/sweet/project
130130
collected 50 items
131131
run-last-failure: rerun previous 2 failures first
132132
@@ -220,6 +220,8 @@ If you run this command for the first time, you can see the print statement:
220220
E assert 42 == 23
221221
222222
test_caching.py:17: AssertionError
223+
-------------------------- Captured stdout setup ---------------------------
224+
running expensive computation...
223225
1 failed in 0.12 seconds
224226
225227
If you run it a second time the value will be retrieved from
@@ -256,96 +258,16 @@ You can always peek at the content of the cache using the
256258
=========================== test session starts ============================
257259
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
258260
cachedir: $PYTHON_PREFIX/.pytest_cache
259-
rootdir: $REGENDOC_TMPDIR
261+
rootdir: /home/sweet/project
260262
cachedir: $PYTHON_PREFIX/.pytest_cache
261263
------------------------------- cache values -------------------------------
262264
cache/lastfailed contains:
263-
{'a/test_db.py::test_a1': True,
264-
'a/test_db2.py::test_a2': True,
265-
'b/test_error.py::test_root': True,
266-
'failure_demo.py::TestCustomAssertMsg::test_custom_repr': True,
267-
'failure_demo.py::TestCustomAssertMsg::test_multiline': True,
268-
'failure_demo.py::TestCustomAssertMsg::test_single_line': True,
269-
'failure_demo.py::TestFailing::test_not': True,
270-
'failure_demo.py::TestFailing::test_simple': True,
271-
'failure_demo.py::TestFailing::test_simple_multiline': True,
272-
'failure_demo.py::TestMoreErrors::test_compare': True,
273-
'failure_demo.py::TestMoreErrors::test_complex_error': True,
274-
'failure_demo.py::TestMoreErrors::test_global_func': True,
275-
'failure_demo.py::TestMoreErrors::test_instance': True,
276-
'failure_demo.py::TestMoreErrors::test_startswith': True,
277-
'failure_demo.py::TestMoreErrors::test_startswith_nested': True,
278-
'failure_demo.py::TestMoreErrors::test_try_finally': True,
279-
'failure_demo.py::TestMoreErrors::test_z1_unpack_error': True,
280-
'failure_demo.py::TestMoreErrors::test_z2_type_error': True,
281-
'failure_demo.py::TestRaises::test_raise': True,
282-
'failure_demo.py::TestRaises::test_raises': True,
283-
'failure_demo.py::TestRaises::test_raises_doesnt': True,
284-
'failure_demo.py::TestRaises::test_reinterpret_fails_with_print_for_the_fun_of_it': True,
285-
'failure_demo.py::TestRaises::test_some_error': True,
286-
'failure_demo.py::TestRaises::test_tupleerror': True,
287-
'failure_demo.py::TestSpecialisedExplanations::test_eq_attrs': True,
288-
'failure_demo.py::TestSpecialisedExplanations::test_eq_dataclass': True,
289-
'failure_demo.py::TestSpecialisedExplanations::test_eq_dict': True,
290-
'failure_demo.py::TestSpecialisedExplanations::test_eq_list': True,
291-
'failure_demo.py::TestSpecialisedExplanations::test_eq_list_long': True,
292-
'failure_demo.py::TestSpecialisedExplanations::test_eq_long_text': True,
293-
'failure_demo.py::TestSpecialisedExplanations::test_eq_long_text_multiline': True,
294-
'failure_demo.py::TestSpecialisedExplanations::test_eq_longer_list': True,
295-
'failure_demo.py::TestSpecialisedExplanations::test_eq_multiline_text': True,
296-
'failure_demo.py::TestSpecialisedExplanations::test_eq_set': True,
297-
'failure_demo.py::TestSpecialisedExplanations::test_eq_similar_text': True,
298-
'failure_demo.py::TestSpecialisedExplanations::test_eq_text': True,
299-
'failure_demo.py::TestSpecialisedExplanations::test_in_list': True,
300-
'failure_demo.py::TestSpecialisedExplanations::test_not_in_text_multiline': True,
301-
'failure_demo.py::TestSpecialisedExplanations::test_not_in_text_single': True,
302-
'failure_demo.py::TestSpecialisedExplanations::test_not_in_text_single_long': True,
303-
'failure_demo.py::TestSpecialisedExplanations::test_not_in_text_single_long_term': True,
304-
'failure_demo.py::test_attribute': True,
305-
'failure_demo.py::test_attribute_failure': True,
306-
'failure_demo.py::test_attribute_instance': True,
307-
'failure_demo.py::test_attribute_multiple': True,
308-
'failure_demo.py::test_dynamic_compile_shows_nicely': True,
309-
'failure_demo.py::test_generative[3-6]': True,
310-
'test_50.py::test_num[17]': True,
265+
{'test_50.py::test_num[17]': True,
311266
'test_50.py::test_num[25]': True,
312-
'test_anothersmtp.py::test_showhelo': True,
313267
'test_assert1.py::test_function': True,
314268
'test_assert2.py::test_set_comparison': True,
315-
'test_backends.py::test_db_initialized[d2]': True,
316269
'test_caching.py::test_function': True,
317-
'test_checkconfig.py::test_something': True,
318-
'test_class.py::TestClass::test_two': True,
319-
'test_compute.py::test_compute[4]': True,
320-
'test_example.py::test_error': True,
321-
'test_example.py::test_fail': True,
322-
'test_foocompare.py::test_compare': True,
323-
'test_module.py::test_call_fails': True,
324-
'test_module.py::test_ehlo': True,
325-
'test_module.py::test_ehlo[mail.python.org]': True,
326-
'test_module.py::test_ehlo[smtp.gmail.com]': True,
327-
'test_module.py::test_event_simple': True,
328-
'test_module.py::test_fail1': True,
329-
'test_module.py::test_fail2': True,
330-
'test_module.py::test_func2': True,
331-
'test_module.py::test_interface_complex': True,
332-
'test_module.py::test_interface_simple': True,
333-
'test_module.py::test_noop': True,
334-
'test_module.py::test_noop[mail.python.org]': True,
335-
'test_module.py::test_noop[smtp.gmail.com]': True,
336-
'test_module.py::test_setup_fails': True,
337-
'test_parametrize.py::TestClass::test_equals[1-2]': True,
338-
'test_sample.py::test_answer': True,
339-
'test_show_warnings.py::test_one': True,
340-
'test_simple.yml::hello': True,
341-
'test_smtpsimple.py::test_ehlo': True,
342-
'test_step.py::TestUserHandling::test_modification': True,
343-
'test_strings.py::test_valid_string[!]': True,
344-
'test_tmp_path.py::test_create_file': True,
345-
'test_tmpdir.py::test_create_file': True,
346-
'test_tmpdir.py::test_needsfiles': True,
347-
'test_unittest_db.py::MyTest::test_method1': True,
348-
'test_unittest_db.py::MyTest::test_method2': True}
270+
'test_foocompare.py::test_compare': True}
349271
cache/nodeids contains:
350272
['test_caching.py::test_function']
351273
cache/stepwise contains:

doc/en/capture.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ of the failing function and hide the other one:
7171
=========================== test session starts ============================
7272
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
7373
cachedir: $PYTHON_PREFIX/.pytest_cache
74-
rootdir: $REGENDOC_TMPDIR
74+
rootdir: /home/sweet/project
7575
collected 2 items
7676
7777
test_module.py .F [100%]

doc/en/doctest.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ then you can just invoke ``pytest`` without command line options:
7272
=========================== test session starts ============================
7373
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
7474
cachedir: $PYTHON_PREFIX/.pytest_cache
75-
rootdir: $REGENDOC_TMPDIR, inifile: pytest.ini
75+
rootdir: /home/sweet/project, inifile: pytest.ini
7676
collected 1 item
7777
7878
mymodule.py . [100%]

doc/en/example/markers.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ You can then restrict a test run to only run tests marked with ``webtest``:
3535
=========================== test session starts ============================
3636
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python
3737
cachedir: $PYTHON_PREFIX/.pytest_cache
38-
rootdir: $REGENDOC_TMPDIR
38+
rootdir: /home/sweet/project
3939
collecting ... collected 4 items / 3 deselected / 1 selected
4040
4141
test_server.py::test_send_http PASSED [100%]
@@ -50,7 +50,7 @@ Or the inverse, running all tests except the webtest ones:
5050
=========================== test session starts ============================
5151
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python
5252
cachedir: $PYTHON_PREFIX/.pytest_cache
53-
rootdir: $REGENDOC_TMPDIR
53+
rootdir: /home/sweet/project
5454
collecting ... collected 4 items / 1 deselected / 3 selected
5555
5656
test_server.py::test_something_quick PASSED [ 33%]
@@ -72,7 +72,7 @@ tests based on their module, class, method, or function name:
7272
=========================== test session starts ============================
7373
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python
7474
cachedir: $PYTHON_PREFIX/.pytest_cache
75-
rootdir: $REGENDOC_TMPDIR
75+
rootdir: /home/sweet/project
7676
collecting ... collected 1 item
7777
7878
test_server.py::TestClass::test_method PASSED [100%]
@@ -87,7 +87,7 @@ You can also select on the class:
8787
=========================== test session starts ============================
8888
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python
8989
cachedir: $PYTHON_PREFIX/.pytest_cache
90-
rootdir: $REGENDOC_TMPDIR
90+
rootdir: /home/sweet/project
9191
collecting ... collected 1 item
9292
9393
test_server.py::TestClass::test_method PASSED [100%]
@@ -102,7 +102,7 @@ Or select multiple nodes:
102102
=========================== test session starts ============================
103103
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python
104104
cachedir: $PYTHON_PREFIX/.pytest_cache
105-
rootdir: $REGENDOC_TMPDIR
105+
rootdir: /home/sweet/project
106106
collecting ... collected 2 items
107107
108108
test_server.py::TestClass::test_method PASSED [ 50%]
@@ -142,7 +142,7 @@ select tests based on their names:
142142
=========================== test session starts ============================
143143
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python
144144
cachedir: $PYTHON_PREFIX/.pytest_cache
145-
rootdir: $REGENDOC_TMPDIR
145+
rootdir: /home/sweet/project
146146
collecting ... collected 4 items / 3 deselected / 1 selected
147147
148148
test_server.py::test_send_http PASSED [100%]
@@ -157,7 +157,7 @@ And you can also run all tests except the ones that match the keyword:
157157
=========================== test session starts ============================
158158
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python
159159
cachedir: $PYTHON_PREFIX/.pytest_cache
160-
rootdir: $REGENDOC_TMPDIR
160+
rootdir: /home/sweet/project
161161
collecting ... collected 4 items / 1 deselected / 3 selected
162162
163163
test_server.py::test_something_quick PASSED [ 33%]
@@ -174,7 +174,7 @@ Or to select "http" and "quick" tests:
174174
=========================== test session starts ============================
175175
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python
176176
cachedir: $PYTHON_PREFIX/.pytest_cache
177-
rootdir: $REGENDOC_TMPDIR
177+
rootdir: /home/sweet/project
178178
collecting ... collected 4 items / 2 deselected / 2 selected
179179
180180
test_server.py::test_send_http PASSED [ 50%]
@@ -370,7 +370,7 @@ the test needs:
370370
=========================== test session starts ============================
371371
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
372372
cachedir: $PYTHON_PREFIX/.pytest_cache
373-
rootdir: $REGENDOC_TMPDIR
373+
rootdir: /home/sweet/project
374374
collected 1 item
375375
376376
test_someenv.py s [100%]
@@ -385,7 +385,7 @@ and here is one that specifies exactly the environment needed:
385385
=========================== test session starts ============================
386386
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
387387
cachedir: $PYTHON_PREFIX/.pytest_cache
388-
rootdir: $REGENDOC_TMPDIR
388+
rootdir: /home/sweet/project
389389
collected 1 item
390390
391391
test_someenv.py . [100%]
@@ -555,12 +555,12 @@ then you will see two tests skipped and two executed tests as expected:
555555
=========================== test session starts ============================
556556
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
557557
cachedir: $PYTHON_PREFIX/.pytest_cache
558-
rootdir: $REGENDOC_TMPDIR
558+
rootdir: /home/sweet/project
559559
collected 4 items
560560
561561
test_plat.py s.s. [100%]
562562
========================= short test summary info ==========================
563-
SKIPPED [2] $REGENDOC_TMPDIR/conftest.py:12: cannot run on platform linux
563+
SKIPPED [2] /home/sweet/project/conftest.py:12: cannot run on platform linux
564564
565565
=================== 2 passed, 2 skipped in 0.12 seconds ====================
566566
@@ -572,7 +572,7 @@ Note that if you specify a platform via the marker-command line option like this
572572
=========================== test session starts ============================
573573
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
574574
cachedir: $PYTHON_PREFIX/.pytest_cache
575-
rootdir: $REGENDOC_TMPDIR
575+
rootdir: /home/sweet/project
576576
collected 4 items / 3 deselected / 1 selected
577577
578578
test_plat.py . [100%]
@@ -626,7 +626,7 @@ We can now use the ``-m option`` to select one set:
626626
=========================== test session starts ============================
627627
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
628628
cachedir: $PYTHON_PREFIX/.pytest_cache
629-
rootdir: $REGENDOC_TMPDIR
629+
rootdir: /home/sweet/project
630630
collected 4 items / 2 deselected / 2 selected
631631
632632
test_module.py FF [100%]
@@ -650,7 +650,7 @@ or to select both "event" and "interface" tests:
650650
=========================== test session starts ============================
651651
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
652652
cachedir: $PYTHON_PREFIX/.pytest_cache
653-
rootdir: $REGENDOC_TMPDIR
653+
rootdir: /home/sweet/project
654654
collected 4 items / 1 deselected / 3 selected
655655
656656
test_module.py FFF [100%]

doc/en/example/nonpython.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ now execute the test specification:
3131
=========================== test session starts ============================
3232
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
3333
cachedir: $PYTHON_PREFIX/.pytest_cache
34-
rootdir: $REGENDOC_TMPDIR/nonpython
34+
rootdir: /home/sweet/project/nonpython
3535
collected 2 items
3636
3737
test_simple.yml F. [100%]
@@ -66,7 +66,7 @@ consulted when reporting in ``verbose`` mode:
6666
=========================== test session starts ============================
6767
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python
6868
cachedir: $PYTHON_PREFIX/.pytest_cache
69-
rootdir: $REGENDOC_TMPDIR/nonpython
69+
rootdir: /home/sweet/project/nonpython
7070
collecting ... collected 2 items
7171
7272
test_simple.yml::hello FAILED [ 50%]
@@ -90,9 +90,9 @@ interesting to just look at the collection tree:
9090
=========================== test session starts ============================
9191
platform linux -- Python 3.x.y, pytest-4.x.y, py-1.x.y, pluggy-0.x.y
9292
cachedir: $PYTHON_PREFIX/.pytest_cache
93-
rootdir: $REGENDOC_TMPDIR/nonpython
93+
rootdir: /home/sweet/project/nonpython
9494
collected 2 items
95-
<Package $REGENDOC_TMPDIR/nonpython>
95+
<Package /home/sweet/project/nonpython>
9696
<YamlFile test_simple.yml>
9797
<YamlItem hello>
9898
<YamlItem ok>

0 commit comments

Comments
 (0)