Skip to content

Commit 4f07f15

Browse files
docs: add a warning about using timeout_func_only = true in INI alongside with pytest.mark on a test (#160)
1 parent d91e6d8 commit 4f07f15

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,17 @@ this really isn't an option a ``timeout_func_only`` boolean setting
227227
exists which can be set in the pytest ini configuration file, as
228228
documented in ``pytest --help``.
229229

230+
For the decorated function, a decorator will override
231+
``timeout_func_only = true`` in the pytest ini file to the default
232+
value. If you need to keep this option for a decorated test, you
233+
must specify the option explicitly again:
234+
235+
.. code:: python
236+
237+
@pytest.mark.timeout(60, func_only=True)
238+
def test_foo():
239+
pass
240+
230241
231242
Debugger Detection
232243
==================

0 commit comments

Comments
 (0)