diff options
author | Stefan Eßer <se@FreeBSD.org> | 2021-09-22 17:48:07 +0200 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2021-09-22 17:48:07 +0200 |
commit | 000a8684bd109c3f9c9b5fabd95add4743b7f45a (patch) | |
tree | 5e177e745402cb40e8a8592f9806509c8b226d0b | |
parent | 242c367ad64b275e372a66e1e6831b54905b60d8 (diff) | |
download | pexpect-000a8684bd109c3f9c9b5fabd95add4743b7f45a.tar.gz |
Do not fail if no alias has been defined
There is no output if no alias has been defined and the test fails in
that case. Adding an alias definition makes the alias command return
at least that just added entry.
-rw-r--r-- | tests/test_replwrap.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_replwrap.py b/tests/test_replwrap.py index 5e50ea2..73c82e8 100644 --- a/tests/test_replwrap.py +++ b/tests/test_replwrap.py @@ -25,7 +25,7 @@ class REPLWrapTestCase(unittest.TestCase): def test_bash(self): bash = replwrap.bash() - res = bash.run_command("alias") + res = bash.run_command("alias xyzzy=true; alias") assert 'alias' in res, res try: @@ -92,7 +92,9 @@ class REPLWrapTestCase(unittest.TestCase): "PS1='{0}' PS2='{1}' " "PROMPT_COMMAND=''") + print(repl) res = repl.run_command("echo $HOME") + print(res) assert res.startswith('/'), res def test_python(self): |