Skip to content

Commit

Permalink
Fix path to pexpect's bashrc (#485)
Browse files Browse the repository at this point in the history
Fix path to pexpect's bashrc, to make tests more reliable.  The path
was changed in 46e6e75
to `replwrap/bashrc.sh` inside pexpect package; however, FWICS no such
directory ever existed and the bashrc file was always directly inside
the package directory.

Without this change, pexpect's bashrc is not loaded and tests fail
when user's bashrc results in a long prompt.  In my case, they failed
on a system with a 12-character hostname (and passed on a system
with a 6-character hostname).
  • Loading branch information
mgorny committed May 12, 2024
1 parent c7cc834 commit 6c9e540
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _repl_sh(command, args, non_printable_insert):


def bash_repl(command="bash"):
bashrc = os.path.join(os.path.dirname(pexpect.__file__), "replwrap", "bashrc.sh")
bashrc = os.path.join(os.path.dirname(pexpect.__file__), "bashrc.sh")
sh = _repl_sh(command, ["--rcfile", bashrc], non_printable_insert="\\[\\]")
return sh

Expand Down

0 comments on commit 6c9e540

Please sign in to comment.