Skip to content

Commit 85d281d

Browse files
committed
Update README
1 parent 9550326 commit 85d281d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,9 @@ Or under the section `tool.pytest.ini_options` if using `pyproject.toml`:
152152
]
153153
154154
Similarly, if a function is known to be thread unsafe and should
155-
cause a test to be marked as thread-unsafe as well, the fully-qualified names
156-
of thread-unsafe functions can be registered through the
157-
`thread_unsafe_functions` option in the INI file (or under
158-
`tool.pytest.ini_options` when using `pyproject.toml`):
155+
cause a test to be marked as thread-unsafe as well, its fully-qualified name
156+
can be registered through the `thread_unsafe_functions` option in the
157+
INI file (or under `tool.pytest.ini_options` when using `pyproject.toml`):
159158

160159
.. code-block:: ini
161160
@@ -165,7 +164,7 @@ of thread-unsafe functions can be registered through the
165164
module.submodule2.func2
166165
...
167166
168-
Also, if you define a `__thread_unsafe__` attribute on a function that is
167+
Also, if you define a `__thread_safe__ = False` attribute on a function that is
169168
called by a test and is up to two levels below in the call stack, then
170169
pytest-run-parallel will automatically detect that a thread-unsafe function
171170
is being used and will mark the test as thread-unsafe.

0 commit comments

Comments
 (0)