File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -187,14 +187,15 @@ def _reset(counter):
187187def emit_warning (msg ):
188188 """Emit a test warning from infrastructure code (outside a ``test[]`` expression).
189189
190- Use this in test runners and other infrastructure that needs to signal
191- a warning through the test framework without being inside a ``test[]``
190+ If you are writing tests, use the `warn[]` macro instead.
191+
192+ Use this function in test runners and other infrastructure that needs to
193+ signal a warning through the test framework without being inside a ``test[]``
192194 or ``warn[]`` macro. The warning will be displayed and counted by the
193195 nearest enclosing ``testset``.
194-
195- Unlike the ``warn[]`` macro, this does not adjust ``tests_run``,
196- because no test has been counted for this warning to "replace".
197196 """
197+ # Unlike the ``warn[]`` macro, this does not adjust ``tests_run``,
198+ # because no test has been counted for this warning to "replace".
198199 _update (tests_warned , + 1 )
199200 cerror (TestWarning (msg ))
200201
You can’t perform that action at this time.
0 commit comments