| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
The test test_bash_env() relies on PS1 being an environment variable.
Therefore, `export PS1` making it always an environment variable.
Before this, the test relied on the users bashrc to do this.
The variable PS1 is (by default) not an _environment_ variable and thus
not shown by `env`. Any variable can be made into an environment
variable by exporting it. Some people do this for PS1 in their bashrc.
Closes: #631
|
|
|
|
|
| |
This makes sure the tests and wrapper works on systems where there
is no python2 nor /usr/bin/python available
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* s/sys.executable/self.PYTHONBIN/
* s/sys.executable/self.PYTHONBIN/
* Update test_isalive.py
* s/sys.executable/self.PYTHONBIN/
* s/sys.executable/self.PYTHONBIN/
* Support cases where pythonbin != sys.executable
* Support cases where pythonbin != sys.executable
* Fix raw use of 'python' to use self.PYTHONBIN
* Fix test_pxssh.py when PYTHONBIN != 'python'
The fake 'ssh' will be started via #!/usr/bin/env python, when it may need to use sys.executable or some other self.PYTHONBIN.
* Remove unnecessary changes from pull request.
* Remove unnecessary changes from pull request.
|
|\
| |
| | |
Fix test_which when sys.getfilesystemencoding() is ascii
|
| | |
|
| | |
|
|\ \
| | |
| | | |
s/xrange/range/ for Python3
|
| |/ |
|
|\ \
| | |
| | | |
Fix typo in one test name, and rename another with no valid tests
|
| | | |
|
| |/ |
|
|\ \
| | |
| | | |
Fix test_ansi.py when running in a non-writable directory
|
| | | |
|
| |/ |
|
|/ |
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If pxssh.login is called with an ssh_config then do not require username since it can be supplied via the config and some programs do not want to manage the username at all since it would require parsing the ssh config.
This commit removes the independent username parameter when formatting cmd and instead appends the flag and the username to ssh_options if a username is provided.
If neither username nor ssh_config is provided raise a TypeError in line with the error raised natively if username was not provided as a required positional argument.
Tests ensure that ssh_config lists a username for the server in question
so the user running the program does not leak. Note that ssh_config
keywords are case-insensitive.
This commit by itself fails tests because it has been modified to
simplifiy the merge commit.
|
|\
| |
| | |
Fix "test_bash" test
|
| |
| |
| |
| |
| |
| |
| | |
Due to an old bash version(3.x) on some systems there is no builtin "time"
command. Another more common one can be used for.
Fixes: https://github.com/pexpect/pexpect/issues/521
|
|/
|
|
|
|
|
|
| |
Pipe like "openssl rand -base64 2097152 | head -n 500" leads to "Broken pipe"
error on some systems. This is an unexpected behavior. So errors must be
suppressed.
Fixes: https://github.com/pexpect/pexpect/issues/523
|
|
|
|
| |
Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
|
|
|
|
|
|
|
|
| |
Add an 'async_' argument to run_command. When True, a coroutine will be
returned which *must* be awaited in asynchronous code.
Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
|
|\
| |
| | |
Update docs and add SSH config file passing
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
properly handle read timeouts with use_poll=True
|
| |/
| |
| |
| | |
see: https://github.com/pexpect/pexpect/issues/491
|
|/ |
|
|\
| |
| | |
Allow callers to enable to use of select.poll()
|
| |
| |
| |
| |
| |
| |
| | |
- This allows systems that can have > 1024 fds to work
- Should be marginally faster
- Added tests to use select.poll()
- Incremented version - Happy to change this, guessed what it should be
|
| | |
|
| | |
|
| |
| |
| |
| | |
the next connection.
|
| | |
|
| | |
|
| | |
|
|\ \ |
|
| |/
| |
| |
| | |
see: https://github.com/pexpect/pexpect/issues/478
|
|/
|
|
| |
Add basic test for SSH tunneling, this can be expanded on with a proper SSH server to test the tunnels over, however this should be good enough for now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I was getting:
0: re.compile("b'^[^\r\n]*\r?\n'")
1: re.compile("b'^--More-- or \\(q\\)uit'")
2: re.compile("b'^\\(.*\\) #'")
So I decided to drop the %s and keep only the %r, which equally for
str and bytes:
>>> ' %d: re.compile(%r)' % (1, b'foo')
" 1: re.compile(b'foo')"
>>> ' %d: re.compile(%r)' % (1, 'foo')
" 1: re.compile('foo')"
|
|
|
|
|
|
|
|
| |
Python strings are slow and expensive as buffers because they're
immutable; replace the output buffer with a StringIO/BytesIO
object
see: https://github.com/pexpect/pexpect/issues/438
|
| |
|