Skip to content

Commit

Permalink
fix: use core more consistently than tracer
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Dec 24, 2023
1 parent 8f3a8aa commit ebdc277
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion coverage/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ def plugin_info(plugins: List[Any]) -> List[str]:
info = [
("coverage_version", covmod.__version__),
("coverage_module", covmod.__file__),
("tracer", self._collector.tracer_name() if self._collector is not None else "-none-"),
("core", self._collector.tracer_name() if self._collector is not None else "-none-"),
("CTracer", "available" if HAS_CTRACER else "unavailable"),
("plugins.file_tracers", plugin_info(self._plugins.file_tracers)),
("plugins.configurers", plugin_info(self._plugins.configurers)),
Expand Down
1 change: 0 additions & 1 deletion igor.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ def should_skip(core):
if test_cores:
if core not in test_cores:
skipper = f"core {core} not in COVERAGE_TEST_CORES={test_cores}"

else:
# $set_env.py: COVERAGE_ONE_CORE - Only run tests for one core.
only_one = os.getenv("COVERAGE_ONE_CORE")
Expand Down
10 changes: 5 additions & 5 deletions tests/test_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,22 +225,22 @@ def assert_good_debug_sys(out_text: str) -> None:
"""Assert that `str` is good output for debug=sys."""
labels = """
coverage_version coverage_module coverage_paths stdlib_paths third_party_paths
tracer configs_attempted config_file configs_read data_file
core configs_attempted config_file configs_read data_file
python platform implementation executable
pid cwd path environment command_line cover_match pylib_match
""".split()
for label in labels:
label_pat = fr"^\s*{label}: "
msg = f"Incorrect lines for {label!r}"
assert 1 == len(re_lines(label_pat, out_text)), msg
tracer_line = re_line("tracer:", out_text).strip()
tracer_line = re_line(" core:", out_text).strip()
if testenv.C_TRACER:
assert tracer_line == "tracer: CTracer"
assert tracer_line == "core: CTracer"
elif testenv.PY_TRACER:
assert tracer_line == "tracer: PyTracer"
assert tracer_line == "core: PyTracer"
else:
assert testenv.SYS_MON
assert tracer_line == "tracer: SysMonitor"
assert tracer_line == "core: SysMonitor"


class DebugOutputTest(CoverageTest):
Expand Down

0 comments on commit ebdc277

Please sign in to comment.