Skip to content

Commit

Permalink
refactor: mostly call things sysmon instead of pep669
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Dec 6, 2023
1 parent 69eda2e commit 09bb580
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions coverage/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
from coverage.disposition import FileDisposition
from coverage.exceptions import ConfigError
from coverage.misc import human_sorted_items, isolate_module
from coverage.pep669_monitor import Pep669Monitor
from coverage.plugin import CoveragePlugin
from coverage.pytracer import PyTracer
from coverage.sysmon import SysMonitor
from coverage.types import (
TArc, TFileDisposition, TTraceData, TTraceFn, TTracer, TWarnFn,
)
Expand Down Expand Up @@ -155,7 +155,7 @@ def __init__(
core = "ctrace"

if core == "sysmon":
self._trace_class = Pep669Monitor
self._trace_class = SysMonitor
self.file_disposition_class = FileDisposition
self.supports_plugins = False
self.packed_arcs = False
Expand Down
4 changes: 2 additions & 2 deletions coverage/pep669_monitor.py → coverage/sysmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def bytes_to_lines(code: CodeType) -> Dict[int, int]:
return b2l


class Pep669Monitor(TTracer):
class SysMonitor(TTracer):
"""Python implementation of the raw data tracer for PEP669 implementations."""

# One of these will be used across threads. Be careful.
Expand Down Expand Up @@ -206,7 +206,7 @@ def __repr__(self) -> str:
points = sum(len(v) for v in self.data.values())
files = len(self.data)
return (
f"<Pep669Monitor at {id(self):#x}: {points} data points in {files} files>"
f"<SysMonitor at {id(self):#x}: {points} data points in {files} files>"
)

@panopticon()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def assert_good_debug_sys(out_text: str) -> None:
assert tracer_line == "tracer: PyTracer"
else:
assert testenv.SYS_MON
assert tracer_line == "tracer: Pep669Monitor"
assert tracer_line == "tracer: SysMonitor"


class DebugOutputTest(CoverageTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def test_exception_if_plugins_on_pytracer(self) -> None:
if testenv.PY_TRACER:
core = "PyTracer"
elif testenv.SYS_MON:
core = "Pep669Monitor"
core = "SysMonitor"

expected_warnings = [
fr"Plugin file tracers \(tests.plugin1.Plugin\) aren't supported with {core}",
Expand Down

0 comments on commit 09bb580

Please sign in to comment.