Skip to content

Commit 9793270

Browse files
committed
fix: NoDebugging needs all the methods of DebugControl #1904
1 parent 4f12504 commit 9793270

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

coverage/debug.py

+5
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ def should(self, option: str) -> bool:
119119
"""Should we write debug messages? Never."""
120120
return False
121121

122+
@contextlib.contextmanager
123+
def without_callers(self) -> Iterator[None]:
124+
"""A dummy context manager to satisfy the api."""
125+
yield
126+
122127
def write(self, msg: str, *, exc: BaseException | None = None) -> None:
123128
"""This will never be called."""
124129
raise AssertionError("NoDebugging.write should never be called.")

0 commit comments

Comments
 (0)