@@ -22,7 +22,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
22
22
cachedir: .pytest_cache
23
23
rootdir: /home/sweet/project
24
24
collected 0 items
25
- cache -- .../_pytest/cacheprovider.py:509
25
+ cache -- .../_pytest/cacheprovider.py:510
26
26
Return a cache object that can persist state between testing sessions.
27
27
28
28
cache.get(key, default)
@@ -33,25 +33,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
33
33
34
34
Values can be any object handled by the json stdlib module.
35
35
36
- capsys -- .../_pytest/capture.py:905
37
- Enable text capturing of writes to ``sys.stdout`` and ``sys.stderr``.
38
-
39
- The captured output is made available via ``capsys.readouterr()`` method
40
- calls, which return a ``(out, err)`` namedtuple.
41
- ``out`` and ``err`` will be ``text`` objects.
42
-
43
- Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.
44
-
45
- Example:
46
-
47
- .. code-block:: python
48
-
49
- def test_output(capsys):
50
- print("hello")
51
- captured = capsys.readouterr()
52
- assert captured.out == "hello\n"
53
-
54
- capsysbinary -- .../_pytest/capture.py:933
36
+ capsysbinary -- .../_pytest/capture.py:1001
55
37
Enable bytes capturing of writes to ``sys.stdout`` and ``sys.stderr``.
56
38
57
39
The captured output is made available via ``capsysbinary.readouterr()``
@@ -69,7 +51,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
69
51
captured = capsysbinary.readouterr()
70
52
assert captured.out == b"hello\n"
71
53
72
- capfd -- .../_pytest/capture.py:961
54
+ capfd -- .../_pytest/capture.py:1029
73
55
Enable text capturing of writes to file descriptors ``1`` and ``2``.
74
56
75
57
The captured output is made available via ``capfd.readouterr()`` method
@@ -87,7 +69,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
87
69
captured = capfd.readouterr()
88
70
assert captured.out == "hello\n"
89
71
90
- capfdbinary -- .../_pytest/capture.py:989
72
+ capfdbinary -- .../_pytest/capture.py:1057
91
73
Enable bytes capturing of writes to file descriptors ``1`` and ``2``.
92
74
93
75
The captured output is made available via ``capfd.readouterr()`` method
@@ -105,7 +87,25 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
105
87
captured = capfdbinary.readouterr()
106
88
assert captured.out == b"hello\n"
107
89
108
- doctest_namespace [session scope] -- .../_pytest/doctest.py:738
90
+ capsys -- .../_pytest/capture.py:973
91
+ Enable text capturing of writes to ``sys.stdout`` and ``sys.stderr``.
92
+
93
+ The captured output is made available via ``capsys.readouterr()`` method
94
+ calls, which return a ``(out, err)`` namedtuple.
95
+ ``out`` and ``err`` will be ``text`` objects.
96
+
97
+ Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.
98
+
99
+ Example:
100
+
101
+ .. code-block:: python
102
+
103
+ def test_output(capsys):
104
+ print("hello")
105
+ captured = capsys.readouterr()
106
+ assert captured.out == "hello\n"
107
+
108
+ doctest_namespace [session scope] -- .../_pytest/doctest.py:737
109
109
Fixture that returns a :py:class:`dict` that will be injected into the
110
110
namespace of doctests.
111
111
@@ -119,7 +119,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
119
119
120
120
For more details: :ref:`doctest_namespace`.
121
121
122
- pytestconfig [session scope] -- .../_pytest/fixtures.py:1356
122
+ pytestconfig [session scope] -- .../_pytest/fixtures.py:1360
123
123
Session-scoped fixture that returns the session's :class:`pytest.Config`
124
124
object.
125
125
@@ -196,7 +196,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
196
196
197
197
.. _legacy_path: https://py.readthedocs.io/en/latest/path.html
198
198
199
- caplog -- .../_pytest/logging.py:491
199
+ caplog -- .../_pytest/logging.py:498
200
200
Access and control log capturing.
201
201
202
202
Captured logs are available through the following properties/methods::
@@ -237,17 +237,19 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
237
237
See https://docs.pytest.org/en/latest/how-to/capture-warnings.html for information
238
238
on warning categories.
239
239
240
- tmp_path_factory [session scope] -- .../_pytest/tmpdir.py:188
240
+ tmp_path_factory [session scope] -- .../_pytest/tmpdir.py:245
241
241
Return a :class:`pytest.TempPathFactory` instance for the test session.
242
242
243
- tmp_path -- .../_pytest/tmpdir.py:203
243
+ tmp_path -- .../_pytest/tmpdir.py:260
244
244
Return a temporary directory path object which is unique to each test
245
245
function invocation, created as a sub directory of the base temporary
246
246
directory.
247
247
248
248
By default, a new base temporary directory is created each test session,
249
- and old bases are removed after 3 sessions, to aid in debugging. If
250
- ``--basetemp`` is used then it is cleared each session. See :ref:`base
249
+ and old bases are removed after 3 sessions, to aid in debugging.
250
+ This behavior can be configured with :confval:`tmp_path_retention_count` and
251
+ :confval:`tmp_path_retention_policy`.
252
+ If ``--basetemp`` is used then it is cleared each session. See :ref:`base
251
253
temporary directory`.
252
254
253
255
The returned object is a :class:`pathlib.Path` object.
0 commit comments