@@ -114,6 +114,9 @@ def exit(
114
114
115
115
:param returncode:
116
116
Return code to be used when exiting pytest. None means the same as ``0`` (no error), same as :func:`sys.exit`.
117
+
118
+ :raises pytest.exit.Exception:
119
+ The exception that is raised.
117
120
"""
118
121
__tracebackhide__ = True
119
122
raise Exit (reason , returncode )
@@ -142,6 +145,9 @@ def skip(
142
145
143
146
Defaults to False.
144
147
148
+ :raises pytest.skip.Exception:
149
+ The exception that is raised.
150
+
145
151
.. note::
146
152
It is better to use the :ref:`pytest.mark.skipif ref` marker when
147
153
possible to declare a test to be skipped under certain conditions
@@ -163,6 +169,9 @@ def fail(reason: str = "", pytrace: bool = True) -> NoReturn:
163
169
:param pytrace:
164
170
If False, msg represents the full failure information and no
165
171
python traceback will be reported.
172
+
173
+ :raises pytest.fail.Exception:
174
+ The exception that is raised.
166
175
"""
167
176
__tracebackhide__ = True
168
177
raise Failed (msg = reason , pytrace = pytrace )
@@ -188,6 +197,9 @@ def xfail(reason: str = "") -> NoReturn:
188
197
It is better to use the :ref:`pytest.mark.xfail ref` marker when
189
198
possible to declare a test to be xfailed under certain conditions
190
199
like known bugs or missing features.
200
+
201
+ :raises pytest.xfail.Exception:
202
+ The exception that is raised.
191
203
"""
192
204
__tracebackhide__ = True
193
205
raise XFailed (reason )
@@ -227,6 +239,9 @@ def importorskip(
227
239
:returns:
228
240
The imported module. This should be assigned to its canonical name.
229
241
242
+ :raises pytest.skip.Exception:
243
+ If the module cannot be imported.
244
+
230
245
Example::
231
246
232
247
docutils = pytest.importorskip("docutils")
0 commit comments