diff options
| author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-09-05 11:26:07 -0400 |
|---|---|---|
| committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-09-05 11:26:07 -0400 |
| commit | f1e4fc3a90bad1c0d245af4c30fe4ec41a474ec9 (patch) | |
| tree | 8b6c25a8ab4418fa526b4b1ca69e8ea42ccf226f /cmd2 | |
| parent | 3e0c9ba1ad4a415e0aba81daf2e7f9f57281b1bc (diff) | |
| download | cmd2-git-f1e4fc3a90bad1c0d245af4c30fe4ec41a474ec9.tar.gz | |
Updated unit tests for read_input()
Diffstat (limited to 'cmd2')
| -rw-r--r-- | cmd2/cmd2.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 088bb500..19f1e6e9 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -2607,6 +2607,9 @@ class Cmd(cmd.Cmd): nonlocal saved_history nonlocal parser + if readline_configured: # pragma: no cover + return + # Configure tab completion if self._completion_supported(): saved_completer = readline.get_completer() @@ -2614,7 +2617,7 @@ class Cmd(cmd.Cmd): # Disable completion if completion_mode == CompletionMode.NONE: # noinspection PyUnusedLocal - def complete_none(text: str, state: int) -> Optional[str]: + def complete_none(text: str, state: int): # pragma: no cover return None complete_func = complete_none @@ -2651,7 +2654,7 @@ class Cmd(cmd.Cmd): def restore_readline(): """Restore readline tab completion and history""" nonlocal readline_configured - if not readline_configured: + if not readline_configured: # pragma: no cover return if self._completion_supported(): |
