| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| | |
Replace deprecated unittest.makeSuite
|
| | |
| |
| |
| |
| |
| | |
This function was never formally documented, but has been deprecated and
will be removed in Python 3.13. Replaced with
unittest.TestLoader.loadTestsFromTestCase.
|
| |/
|
|
|
| |
unittest.TestCase.assertRaisesRegexp was deprecated in Python 3.2 and is
removed in Python 3.12.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
| |
see: https://github.com/pexpect/pexpect/issues/491
|
| |
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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')"
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Currently pexpect.spawn takes an env argument along the lines of
subprocess.Popen but fails to use PATH from that env when finding
the binary to run.
The result when running a binary not on the PATH of the parent
process is pexpect will raise an exception, or worse, find a
different binary with the same name.
This change passes the env from spawn into the which function
so the correct PATH is searched and adds test coverage.
|
| | |
|
| |\
| |
| | |
Allow spawn() and friends to be used as context managers
|
| | |
| |
| |
| | |
Closes gh-111
|
| |/ |
|
| |
|
|
|
|
|
| |
According to test_misc.py comments, fedora's build
agent has the same problem as ours. We use the setUp
and tearDown methods to set and restore these signals,
if ignored.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- standard/local import grouping
- docstring every test
- pep8 formatting
- remove custom assertion messages
- Separate tests to individual groups
- Remove unnecessary time.sleep() calls
- use echo=False parameter, avoiding testing
combinations of mixed input+output, and removing
the need to document this strange combination.
- programmatically test searcher_re/_string
- prefer assertRaises/assertRaisesRegexp
- use tempfile.gettempdir() instead of /tmp
|
| | |
|
| | |
|
| |\
| |
| | |
new function is_exe() makes existing which() more correct
|
| | | |
|
| |/
|
|
|
|
|
|
| |
Submitted by @auntieNeo, fixes exception, "TypeError:
got <type 'str'> ('\r\n') as pattern" in spawnu.readline().
Bytes b'\r\n' was concatenated to u'unicode', causing an
exception to be thrown when using readline().
|
| |
|
|
| |
Closes gh-59
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Fedora build machines call signal.signal(signal.SIGHUP, signal.SIG_IGN)
as part of daemonizing, but this test needs the child process to use the
default signal handler.
|
| | |
|
| | |
|
| |
|
|
| |
Closes gh-12 (hopefully)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
-except Exception as e:
+except Exception, err:
the unfortunate use of six.b('') instead of b''
print(arg0, arg1) => six.print_(arg0, arg1)
some autopep8 -i is definitely called for, some of these test cases are darn unreadable, but did partially pep8 some of the really-long-over-80col-lines.
|
| |
|
|
| |
not even sure if pexpect can get as far back as python2.5, but its worth a shot.
|
| |
|
|
| |
here goes backwards compatibility testing for py2 versions -- though I have them all locally, trying for travis CI which would help identify problems going forward. I'm sure there is some six.PY3 things to work out yet, already noticed I need a from __future__ import for the 'with' contextmanager for python 2.5.
|
| |
|
|
| |
This causes various tests, that depend on cat(1) to fail on Mac OSX 10.8.5. These changes ensure that if ^D\x08\x08 ('^D', followed by '\b\b') is found, it is removed.
|
| | |
|
| | |
|
| | |
|
| |
|