diff options
author | Eric Lin <anselor@gmail.com> | 2018-04-19 12:49:24 -0400 |
---|---|---|
committer | Eric Lin <anselor@gmail.com> | 2018-04-19 12:49:24 -0400 |
commit | df09c85e8db95622820712f29228dac2dc049935 (patch) | |
tree | 3c6ccbd0b03a0ff510d112a97c512e87fc7999c4 /cmd2/rl_utils.py | |
parent | c2186332aeb6f59063bb410fca25ed400ce410cd (diff) | |
download | cmd2-git-df09c85e8db95622820712f29228dac2dc049935.tar.gz |
Identified and marked a few blocks of code that can't be reached during unit tests due to the lack of a real terminal. Some more comments.
Diffstat (limited to 'cmd2/rl_utils.py')
-rw-r--r-- | cmd2/rl_utils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd2/rl_utils.py b/cmd2/rl_utils.py index c00a5784..d5bef1ff 100644 --- a/cmd2/rl_utils.py +++ b/cmd2/rl_utils.py @@ -18,7 +18,7 @@ except ImportError: try: # noinspection PyUnresolvedReferences import readline - except ImportError: + except ImportError: # pragma: no cover pass @@ -51,7 +51,8 @@ def rl_force_redisplay() -> None: """ if not sys.stdout.isatty(): return - if rl_type == RlType.GNU: + + if rl_type == RlType.GNU: # pragma: no cover # rl_forced_update_display() is the proper way to redraw the prompt and line, but we # have to use ctypes to do it since Python's readline API does not wrap the function readline_lib.rl_forced_update_display() @@ -60,6 +61,6 @@ def rl_force_redisplay() -> None: display_fixed = ctypes.c_int.in_dll(readline_lib, "rl_display_fixed") display_fixed.value = 1 - elif rl_type == RlType.PYREADLINE: + elif rl_type == RlType.PYREADLINE: # pragma: no cover # noinspection PyProtectedMember readline.rl.mode._print_prompt() |