@@ -235,51 +235,48 @@ Warnings
235
235
During execution, coverage.py may warn you about conditions it detects that
236
236
could affect the measurement process. The possible warnings include:
237
237
238
- * `` Couldn't parse Python file XXX (couldnt-parse) `` | br |
238
+ Couldn't parse Python file XXX (couldnt-parse)
239
239
During reporting, a file was thought to be Python, but it couldn't be parsed
240
240
as Python.
241
241
242
- * `` Trace function changed, data is likely wrong: XXX (trace-changed) `` | br |
242
+ Trace function changed, data is likely wrong: XXX (trace-changed)
243
243
Coverage measurement depends on a Python setting called the trace function.
244
244
Other Python code in your product might change that function, which will
245
245
disrupt coverage.py's measurement. This warning indicates that has happened.
246
246
The XXX in the message is the new trace function value, which might provide
247
247
a clue to the cause.
248
248
249
- * `` Module XXX has no Python source (module-not-python) `` | br |
249
+ Module XXX has no Python source (module-not-python)
250
250
You asked coverage.py to measure module XXX, but once it was imported, it
251
251
turned out not to have a corresponding .py file. Without a .py file,
252
252
coverage.py can't report on missing lines.
253
253
254
- * `` Module XXX was never imported (module-not-imported) `` | br |
254
+ Module XXX was never imported (module-not-imported)
255
255
You asked coverage.py to measure module XXX, but it was never imported by
256
256
your program.
257
257
258
- * `` No data was collected (no-data-collected) `` | br |
258
+ No data was collected (no-data-collected)
259
259
Coverage.py ran your program, but didn't measure any lines as executed.
260
260
This could be because you asked to measure only modules that never ran,
261
261
or for other reasons.
262
262
263
- * ``Module XXX was previously imported, but not measured
264
- (module-not-measured) ``
265
- |br |
263
+ Module XXX was previously imported, but not measured (module-not-measured)
266
264
You asked coverage.py to measure module XXX, but it had already been imported
267
265
when coverage started. This meant coverage.py couldn't monitor its
268
266
execution.
269
267
270
- * ``Already imported a file that will be measured: XXX (already-imported) ``
271
- |br |
268
+ Already imported a file that will be measured: XXX (already-imported)
272
269
File XXX had already been imported when coverage.py started measurement. Your
273
270
setting for ``--source `` or ``--include `` indicates that you wanted to
274
271
measure that file. Lines will be missing from the coverage report since the
275
272
execution during import hadn't been measured.
276
273
277
- * `` - -include is ignored because - -source is set (include-ignored)`` | br |
274
+ \-\ - include is ignored because \-\ - source is set (include-ignored)
278
275
Both ``--include `` and ``--source `` were specified while running code. Both
279
276
are meant to focus measurement on a particular part of your source code, so
280
277
``--include `` is ignored in favor of ``--source ``.
281
278
282
- * `` Conflicting dynamic contexts (dynamic-conflict) `` | br |
279
+ Conflicting dynamic contexts (dynamic-conflict)
283
280
The ``[run] dynamic_context `` option is set in the configuration file, but
284
281
something (probably a test runner plugin) is also calling the
285
282
:meth: `.Coverage.switch_context ` function to change the context. Only one of
@@ -293,6 +290,7 @@ collected," add this to your .coveragerc file::
293
290
disable_warnings = no-data-collected
294
291
295
292
or pyproject.toml::
293
+
296
294
[tool.coverage.run]
297
295
disable_warnings = ['no-data-collected']
298
296
0 commit comments