|
29 | 29 | from coverage.inorout import InOrOut
|
30 | 30 | from coverage.jsonreport import JsonReporter
|
31 | 31 | from coverage.lcovreport import LcovReporter
|
32 |
| -from coverage.misc import bool_or_none, join_regex, human_sorted, human_sorted_items |
| 32 | +from coverage.misc import bool_or_none, join_regex, human_sorted |
33 | 33 | from coverage.misc import DefaultValue, ensure_dir_for_file, isolate_module
|
34 | 34 | from coverage.plugin import FileReporter
|
35 | 35 | from coverage.plugin_support import Plugins
|
@@ -315,35 +315,25 @@ def _write_startup_debug(self):
|
315 | 315 | """Write out debug info at startup if needed."""
|
316 | 316 | wrote_any = False
|
317 | 317 | with self._debug.without_callers():
|
318 |
| - if self._debug.should('config'): |
319 |
| - config_info = human_sorted_items(self.config.__dict__.items()) |
320 |
| - config_info = [(k, v) for k, v in config_info if not k.startswith('_')] |
321 |
| - write_formatted_info(self._debug, "config", config_info) |
| 318 | + if self._debug.should("config"): |
| 319 | + config_info = self.config.debug_info() |
| 320 | + write_formatted_info(self._debug.write, "config", config_info) |
322 | 321 | wrote_any = True
|
323 | 322 |
|
324 |
| - if self._debug.should('sys'): |
325 |
| - write_formatted_info(self._debug, "sys", self.sys_info()) |
| 323 | + if self._debug.should("sys"): |
| 324 | + write_formatted_info(self._debug.write, "sys", self.sys_info()) |
326 | 325 | for plugin in self._plugins:
|
327 | 326 | header = "sys: " + plugin._coverage_plugin_name
|
328 | 327 | info = plugin.sys_info()
|
329 |
| - write_formatted_info(self._debug, header, info) |
| 328 | + write_formatted_info(self._debug.write, header, info) |
330 | 329 | wrote_any = True
|
331 | 330 |
|
332 |
| - if self._debug.should('pybehave'): |
333 |
| - info = [ |
334 |
| - (name, value) for name, value in env.__dict__.items() |
335 |
| - if not name.startswith("_") and |
336 |
| - name != "PYBEHAVIOR" and |
337 |
| - not isinstance(value, type(os)) |
338 |
| - ] + [ |
339 |
| - (name, value) for name, value in env.PYBEHAVIOR.__dict__.items() |
340 |
| - if not name.startswith("_") |
341 |
| - ] |
342 |
| - write_formatted_info(self._debug, "pybehave", sorted(info)) |
| 331 | + if self._debug.should("pybehave"): |
| 332 | + write_formatted_info(self._debug.write, "pybehave", env.debug_info()) |
343 | 333 | wrote_any = True
|
344 | 334 |
|
345 | 335 | if wrote_any:
|
346 |
| - write_formatted_info(self._debug, "end", ()) |
| 336 | + write_formatted_info(self._debug.write, "end", ()) |
347 | 337 |
|
348 | 338 | def _should_trace(self, filename, frame):
|
349 | 339 | """Decide whether to trace execution in `filename`.
|
|
0 commit comments