summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* REPLWrapTestCase.test_bash_env(): export variable PS1whitley-delamora2020-03-281-0/+1
| | | | | | | | | | | 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
* Do not directly call python and use sys.executableTomáš Chvátal2020-03-123-7/+8
| | | | | This makes sure the tests and wrapper works on systems where there is no python2 nor /usr/bin/python available
* Provide bad version range in regression test docstringsdluyer2020-01-101-3/+3
|
* Add another regression testdluyer2020-01-101-0/+6
|
* Add test for increasing searchwindowsizedluyer2020-01-101-2/+21
|
* Fix test_before_after_timeout for PY3.dluyer2020-01-101-1/+1
|
* Whitespace cleanupdluyer2020-01-101-1/+1
|
* Add test for truncation issue fixed in #579dluyer2020-01-101-1/+17
|
* Always use self.PYTHONBIN not 'python' or sys.executable in tests (#580)dluyer2019-08-077-16/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Merge pull request #585 from dluyer/patch-8Thomas Kluyver2019-08-071-1/+6
|\ | | | | Fix test_which when sys.getfilesystemencoding() is ascii
| * Test for Python 2 ASCII encoding, too.dluyer2019-08-061-1/+1
| |
| * Fix test_which when sys.getfilesystemencoding() is asciidluyer2019-08-061-1/+6
| |
* | Merge pull request #583 from dluyer/patch-6Thomas Kluyver2019-08-071-1/+1
|\ \ | | | | | | s/xrange/range/ for Python3
| * | s/xrange/range/ for Python3dluyer2019-08-061-1/+1
| |/
* | Merge pull request #584 from dluyer/patch-7Thomas Kluyver2019-08-072-0/+0
|\ \ | | | | | | Fix typo in one test name, and rename another with no valid tests
| * | Mark disabled test as deprecated.dluyer2019-08-061-0/+0
| | |
| * | Fix typo in test name.dluyer2019-08-061-0/+0
| |/
* | Merge pull request #582 from dluyer/patch-5Thomas Kluyver2019-08-071-2/+14
|\ \ | | | | | | Fix test_ansi.py when running in a non-writable directory
| * | Fix copy/paste error in uploading patchdluyer2019-08-061-4/+4
| | |
| * | Fix test_ansi.py when running in a non-writable directorydluyer2019-08-061-2/+14
| |/
* | Use IPv6 loopback if there is no IPv4 loopback availabledluyer2019-08-051-11/+21
|/
* Merge branch 'master' of https://github.com/pexpect/pexpect into patch-1Tom Gillespie2019-03-232-3/+123
|\
| * Allow customized pxssh client #528Trek3332019-03-212-3/+123
| |
* | pxssh.login require either username or ssh_configTom Gillespie2019-03-231-2/+74
|/ | | | | | | | | | | | | | | 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.
* Merge pull request #522 from stanislavlevin/fix_test_bashThomas Kluyver2018-09-061-2/+2
|\ | | | | Fix "test_bash" test
| * Fix "test_bash" testStanislav Levin2018-08-201-2/+2
| | | | | | | | | | | | | | 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
* | Fix "test_before_across_chunks" testStanislav Levin2018-08-201-1/+1
|/ | | | | | | | 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
* tests: increase replwrap coverageThomas Faivre2018-06-191-1/+8
| | | | Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
* replwrap: add async supportRobin Jarry2018-06-191-1/+28
| | | | | | | | 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>
* Merge pull request #490 from Red-M/masterThomas Kluyver2018-05-291-3/+11
|\ | | | | Update docs and add SSH config file passing
| * Update pxssh test.Red_M2018-05-291-1/+1
| |
| * Fix as per #490 comments.Red_M2018-05-291-3/+4
| |
| * Add test cases for #429 and fix feature for #429.Red_M2018-05-201-0/+7
| |
* | Merge pull request #492 from ryanpetrello/fix-poll-timeoutsThomas Kluyver2018-05-241-0/+6
|\ \ | | | | | | properly handle read timeouts with use_poll=True
| * | properly handle read timeouts with use_poll=TrueRyan Petrello2018-05-211-0/+6
| |/ | | | | | | see: https://github.com/pexpect/pexpect/issues/491
* | Make `crlf` match the default platform behaviour in `PopenSpawn`. Fixes #488Jerome M. BERGER2018-05-221-0/+8
|/
* Merge pull request #474 from cooperlees/masterRed_M2018-04-102-4/+40
|\ | | | | Allow callers to enable to use of select.poll()
| * Allow for configurable select.poll() usageCooper Ry Lees2018-03-232-4/+40
| | | | | | | | | | | | | | - 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
* | Fix bug in remote SSH tunneling test.Red_M2018-03-301-1/+1
| |
* | Add tests for using the ssh_key option.Red_M2018-03-301-4/+14
| |
* | Add testing for remote tunnels and passing the SSH authentication socket to ↵Red_M2018-03-301-4/+30
| | | | | | | | the next connection.
* | Bug fix unit test for SSH tunnels.Red_M2018-03-301-3/+7
| |
* | Add output for failure in test.Red_M2018-03-301-0/+1
| |
* | Fix bug in test case.Red_M2018-03-301-1/+1
| |
* | Merge branch 'master' of github.com:Red-M/pexpectRed_M2018-03-301-0/+11
|\ \
| * | fix a bug causing 'spawn.before' to be truncated w/ searchwindowsize useRyan Petrello2018-03-271-0/+11
| |/ | | | | | | see: https://github.com/pexpect/pexpect/issues/478
* | Fix bug with dynamic SSH tunnels.Red_M2018-03-301-0/+9
|/ | | | 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.
* FIX: bad representation of bytes patterns.Julien Palard2018-02-121-1/+1
| | | | | | | | | | | | | | | | 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')"
* optimize pty buffering and searchingRyan Petrello2018-02-052-0/+14
| | | | | | | | 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
* Spelling fixesVille Skyttä2017-09-151-1/+1
|