Skip to content

Commit 87551d5

Browse files
committed
Removed terminal functions from code coverage
1 parent c0c8707 commit 87551d5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cmd2/cmd2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3131,7 +3131,7 @@ class TestMyAppCase(Cmd2TestCase):
31313131
runner = unittest.TextTestRunner()
31323132
runner.run(testcase)
31333133

3134-
def _clear_input_lines_str(self) -> str:
3134+
def _clear_input_lines_str(self) -> str: # pragma: no cover
31353135
"""
31363136
Returns a string that if printed will clear the prompt and input lines in the terminal,
31373137
leaving the cursor at the beginning of the first input line
@@ -3175,7 +3175,7 @@ def _clear_input_lines_str(self) -> str:
31753175

31763176
return terminal_str
31773177

3178-
def async_alert(self, alert_msg: str, new_prompt: Optional[str] = None) -> None:
3178+
def async_alert(self, alert_msg: str, new_prompt: Optional[str] = None) -> None: # pragma: no cover
31793179
"""
31803180
Used to display an important message to the user while they are at the prompt in between commands.
31813181
To the user it appears as if an alert message is printed above the prompt and their current input
@@ -3218,7 +3218,7 @@ def async_alert(self, alert_msg: str, new_prompt: Optional[str] = None) -> None:
32183218
else:
32193219
raise RuntimeError("another thread holds terminal_lock")
32203220

3221-
def async_update_prompt(self, new_prompt: str) -> None:
3221+
def async_update_prompt(self, new_prompt: str) -> None: # pragma: no cover
32223222
"""
32233223
Updates the prompt while the user is still typing at it. This is good for alerting the user to system
32243224
changes dynamically in between commands. For instance you could alter the color of the prompt to indicate
@@ -3260,7 +3260,7 @@ def async_update_prompt(self, new_prompt: str) -> None:
32603260
raise RuntimeError("another thread holds terminal_lock")
32613261

32623262
@staticmethod
3263-
def set_window_title(title: str) -> None:
3263+
def set_window_title(title: str) -> None: # pragma: no cover
32643264
"""
32653265
Sets the terminal window title
32663266
:param title: the new window title

cmd2/rl_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def rl_make_safe_prompt(prompt: str, start: str = "\x01", end: str = "\x02") ->
182182
:param end: end code to tell GNU Readline about end of invisible characters
183183
:return: prompt safe to pass to GNU Readline
184184
"""
185-
if rl_type == RlType.GNU:
185+
if rl_type == RlType.GNU: # pragma: no cover
186186
escaped = False
187187
result = ""
188188

0 commit comments

Comments
 (0)