summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #698 from stesser/masterHEADmasterRed_M2023-04-033-4/+8
|\ | | | | Make test_expect.py work on POSIX systems that are not Linux based
| * Do not fail if no alias has been definedStefan Eßer2021-09-221-1/+3
| | | | | | | | | | | | 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.
| * Disable baacketed-paste mode in bash 5.1 and newer (issue #669)Stefan Eßer2021-09-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bash versions starting with 5.1 have bracketed paste mode enabled by default, leading to test failures in replwrap.bash(), e.g.: self = <tests.test_replwrap.REPLWrapTestCase testMethod=test_multiline> def test_multiline(self): bash = replwrap.bash() res = bash.run_command("echo '1 2\n3 4'") > self.assertEqual(res.strip().splitlines(), ['1 2', '3 4']) E AssertionError: Lists differ: ['\x1b[?2004l', '\x1b[?2004h\x1b[?2004l', '1 2', '3 4', '\x1b[?2004h'] != ['1 2', '3 4'] E E First differing element 0: E '\x1b[?2004l' E '1 2' E E First list contains 3 additional elements. E First extra element 2: E '1 2' E E - ['\x1b[?2004l', '\x1b[?2004h\x1b[?2004l', '1 2', '3 4', '\x1b[?2004h'] E + ['1 2', '3 4'] With bracketed test mode disabled, the tests that were affected by the inserted escape sequences succeed.
| * Replace deprecated assertRaisesRegexp with assertRaisesRegexStefan Eßer2021-09-224-11/+11
| | | | | | | | | | The assertRaisesRegexp function appeared in Python-3.1 and was renamed to assertRaisesRegex in Python-3.2.
| * Do not send more characters than can be buffered by catStefan Eßer2021-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cat command on FreeBSD blocks if the default input buffer fills and not output can be sent. The test used to generate more than 10 KB of data before accepting the output generated by the cat program, causing cat to block (stop reading input) until the output buffer has been drained. There is no reason to send long lines in this test, therefore it is easily possible to perform the tests with lines that do not cause more than 4 KB (the default input buffer size on FreeBSD) to be sent before output from the cat program is checked. In order to not depend on such buffer sizes pexpect needs to check for output from the spawned command and buffer it, before it gets to execute the expect() function. Apparently this is not happening and thus the system dependent buffer size limit makes this test fail if its capacity is exceeded.
| * Use only POSIX commands and optionsStefan Eßer2021-09-221-1/+1
| | | | | | | | | | | | | | | | The hard-coded use of /bin/bash and of long options for nl does only work on Linux based systems with GNU textutils. If POSIX commands and options are used, this test becomes portable to other systems than Linux.
* | Merge pull request #728 from rafrafek/patch-1Red_M2023-04-031-0/+6
|\ \ | | | | | | Update docs to use context manager
| * | Update docs to use context managerRafał2022-11-091-0/+6
| | | | | | | | | Add an example to the docs of how to use spawn() function with context manager.
* | | Merge pull request #745 from tapple/socket_spawnRed_M2023-03-1411-48/+350
|\ \ \ | | | | | | | | Socket Pexpect (for Windows support)
| * | | duplicated test_socket to test socket_spawn and fdspawn bothTapple Fulmer2023-02-272-26/+78
| | | |
| * | | docsTapple2023-02-212-5/+7
| | | |
| * | | docsTapple2023-02-213-0/+23
| | | |
| * | | renamed module socket_expect to socket_pexpectTapple2023-02-212-5/+5
| | | |
| * | | renamed module socket_spawn to socket_expectTapple2023-02-212-5/+5
| | | |
| * | | socketspawn basic test case, copied from test_fdspawnTapple2023-02-213-30/+100
| | | |
| * | | unit tests can now be imported on windowsTapple2023-02-213-5/+10
| | | |
| * | | socket_spawnTapple2023-02-211-0/+150
| | | |
* | | | Merge pull request #732 from karrukola/modern_asyncRed_M2023-03-143-103/+257
|\ \ \ \ | |/ / / |/| | | refactor(_async.py): introduce modern coroutine syntax
| * | | fix(test_async.py): do not modify async tests from masterFilippo Carra2023-03-131-39/+32
| | | | | | | | | | | | | | | | | | | | | | | | deprecation warning for get_event_loop() to be taken care in other change Signed-off-by: Filippo Carra <karrukola@users.noreply.github.com>
| * | | Merge branch 'pexpect:master' into modern_asyncFilippo Carra2023-02-2726-53/+50
| |\ \ \ | |/ / / |/| | |
* | | | Merge pull request #744 from loodvn/patch-1Red_M2023-02-151-3/+2
|\ \ \ \ | | | | | | | | | | Remove deprecated RSAAuthentication option (SSHv1), fixes #717
| * | | | Remove deprecated RSAAuthentication option (SSHv1), fixes #717Lood2023-02-141-3/+2
|/ / / /
* | | | Merge pull request #722 from waveform80/fix-run-testsRed_M2023-02-141-12/+10
|\ \ \ \ | | | | | | | | | | Ensure test_run.py works when system-wide bashrc produces output
| * | | | Ensure test_run.py works when system-wide bashrc produces outputDave Jones2022-08-231-12/+10
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --rcfile option to bash does not prevent the system-wide /etc/bash.bashrc script from running (contrary to the Debian man-page). This causes test_run.py to fail when the system-wide script produces output (as is the case in an Ubuntu image where the regular user belongs to the "sudo" group and the system-wide script produces an informational message about sudo usage). Rather than rely on --rcfile, this patch changes the test to use --norc (which does suppress the execution of the system-wide bashrc), and changes PS1 via the inherited environment instead (this also slightly simplifies the fixture setup too as tempfile is no longer required).
* | | | Merge pull request #739 from swt2c/makeSuiteRed_M2023-02-1422-22/+22
|\ \ \ \ | | | | | | | | | | Replace deprecated unittest.makeSuite
| * | | | tests: Replace deprecated unittest.makeSuiteScott Talbert2023-02-0222-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function was never formally documented, but has been deprecated and will be removed in Python 3.13. Replaced with unittest.TestLoader.loadTestsFromTestCase.
* | | | | Merge pull request #742 from swt2c/fix_fakesshRed_M2023-02-141-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Fix SyntaxWarning in fakessh by using raw string
| * | | | | Fix SyntaxWarning in fakessh by using raw stringScott Talbert2023-02-121-1/+1
| |/ / / /
* | | | | Merge pull request #737 from swt2c/assertRaisesRegexpRed_M2023-02-144-11/+11
|\ \ \ \ \ | | | | | | | | | | | | tests: Replace assertRaisesRegexp with assertRaisesRegex
| * | | | | tests: Replace assertRaisesRegexp with assertRaisesRegexScott Talbert2023-02-014-11/+11
| |/ / / / | | | | | | | | | | | | | | | | | | | | unittest.TestCase.assertRaisesRegexp was deprecated in Python 3.2 and is removed in Python 3.12.
* | | | | Merge pull request #743 from swt2c/travis_to_ciRed_M2023-02-141-4/+4
|\ \ \ \ \ | |/ / / / |/| | | | test_interact: update Travis overrides to use generic CI variable
| * | | | test_interact: update Travis overrides to use generic CI variableScott Talbert2023-02-131-4/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | These tests have the same issues on GitHub Actions, so switch to use the more generic 'CI' variable to detect when being run on a CI platform to handle these tests properly.
| | * | Merge branch 'pexpect:master' into modern_asyncFilippo Carra2023-01-171-0/+40
| | |\ \ | |_|/ / |/| | |
* | | | Merge pull request #734 from swt2c/ci_github_actionsRed_M2023-01-091-0/+40
|\ \ \ \ | | | | | | | | | | Port CI to use GitHub Actions
| * | | | Port CI to use GitHub ActionsScott Talbert2022-12-271-0/+40
|/ / / /
| | * | refactor(_async.py): introduce modern coroutine syntaxFilippo Carra2022-11-234-135/+296
| |/ / |/| | | | | | | | Python 3.5 introduced the await and async def keywords. This change imports the coroutines from two different places, depending on the running Python version.
* | | Merge pull request #730 from kbriggs/remove-capturelogRed_M2022-11-101-1/+0
|\ \ \ | |/ / |/| | Remove `pytest-capturelog` from testing requirements
| * | Remove pytest-capturelog from testing requirementsKieron Briggs2022-11-101-1/+0
|/ / | | | | | | | | | | | | The pytest-capturelog plugin no longer exists; its functionality has been merged into the pytest core since ~3.3. Remove the dependency. Fixes #729
* | Merge pull request #560 from EmersonPrado/coerce-regex-bytesRed_M2022-02-062-0/+85
|\ \ | | | | | | [Issue #558] Coerce compiled regex patterns type according to spawn encoding
| * | Coerce compiled regex patterns to non-bytes type in non-bytes modeemerson.prado2019-03-051-0/+3
| | |
| * | Coerce compiled regex patterns to bytes type in bytes modeemerson.prado2019-03-051-0/+8
| | |
| * | Add integration tests for regex coercing functionsemerson.prado2019-03-051-0/+24
| | |
| * | Add unit tests for regex coercing functionsemerson.prado2019-03-051-0/+30
| | |
| * | Add type selection helper function for regex coercing testsemerson.prado2019-03-051-0/+20
| | |
* | | Merge pull request #604 from eldipa/Issue-587-Example-PyteRed_M2022-02-061-0/+120
|\ \ \ | | | | | | | | Examples of how to use Pexpect and Pyte (issue #587)
| * | | Examples of how to use Pexpect and Pyte (issue #587)Martin Di Paola2019-12-081-0/+120
| | | |
* | | | Merge pull request #663 from kulikjak/test_pager_as_cat-fixRed_M2022-02-061-1/+1
|\ \ \ \ | |_|_|/ |/| | | fix `test_pager_as_cat` test case on Solaris
| * | | better fix of this issueJakub Kulík2020-10-201-1/+1
| | | |
| * | | fix test_pager_as_cat test case on SolarisJakub Kulík2020-10-191-1/+1
| | | |
* | | | Merge pull request #684 from tirkarthi/fix-threadingRed_M2021-04-171-1/+1
|\ \ \ \ | |/ / / |/| | | Set daemon attribute instead of using setDaemon method that was deprecated in Python 3.10