summaryrefslogtreecommitdiff
path: root/tests/test_misc.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #164 from takluyver/contextmanagerJeff Quast2014-12-191-0/+10
|\ | | | | Allow spawn() and friends to be used as context managers
| * Allow spawn() and friends to be used as context managersThomas Kluyver2014-12-191-0/+10
| | | | | | | | Closes gh-111
* | Update test case for preexec_fnThomas Kluyver2014-12-191-2/+2
|/
* Set default signal handlers for SIGINT and SIGHUP.Jeff Quast2014-11-231-34/+17
| | | | | | | 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.
* Delegate more methods to ptyprocessThomas Kluyver2014-11-231-1/+1
|
* Incremental housekeeping cleanup of test_misc.pyjquast2014-06-281-161/+198
| | | | | | | | | | | | | | | - 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
* Miscellaneous minor fixesThomas Kluyver2014-06-151-1/+1
|
* Solaris support, tested on SmartOS from cron(1).Jeff Quast2014-06-151-20/+19
|
* Merge pull request #70 from pexpect/more-exacting-whichThomas Kluyver2014-06-101-76/+0
|\ | | | | new function is_exe() makes existing which() more correct
| * Separate which tests into test_which.pyjquast2014-06-071-76/+0
| |
* | PR #66: TypeError thrown by spawnu.readline()jquast2014-06-081-0/+7
|/ | | | | | | | 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().
* Fix imports in tests for Python 3Thomas Kluyver2014-06-011-1/+1
| | | | Closes gh-59
* remove all unnecessary importsjquast2014-06-011-1/+0
|
* folders should not be returned by pexpect.which()jquast2014-06-011-1/+64
|
* Make test_sighup robust against a parent process ignoring SIGHUPThomas Kluyver2013-11-041-16/+33
| | | | | | 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.
* Test and fix getting tracebacks excluding pexpect codeThomas Kluyver2013-10-211-0/+11
|
* Test our own pty fork implementationThomas Kluyver2013-10-211-0/+11
|
* Call readlines() before stdout is discardedThomas Kluyver2013-10-091-3/+4
| | | | Closes gh-12 (hopefully)
* Improve test for setting and retrieving window sizebetter-test-winsizeThomas Kluyver2013-10-091-4/+0
|
* Add test for ignore_sighup optionThomas Kluyver2013-10-081-2/+21
|
* Minor fixes to some testsThomas Kluyver2013-09-261-2/+2
|
* Don't use six for testsThomas Kluyver2013-09-231-26/+25
|
* Fix SyntaxError in test_miscThomas Kluyver2013-09-231-1/+1
|
* add note about line buffering, add sleep timersjquast2013-09-231-7/+17
|
* correct use of % formatting tuple,jquast2013-09-231-2/+2
|
* add missing import (time)jquast2013-09-231-0/+1
|
* another syntaxerror fix, missing end parenjquast2013-09-231-1/+1
|
* fix assertions to display what failed assertion!jquast2013-09-231-8/+34
|
* display error fix and brevity of childexit assrtsjquast2013-09-221-4/+4
|
* assert child exitcodejquast2013-09-221-0/+2
|
* exitstatus fixjquast2013-09-221-1/+1
|
* assert child exit statusjquast2013-09-221-0/+2
|
* py2.5 compatibilities w/six.pyjquast2013-09-221-24/+25
| | | | | | | | | | -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.
* more py25 compatibilityjquast2013-09-221-0/+1
| | | | not even sure if pexpect can get as far back as python2.5, but its worth a shot.
* smartly use .replace & remove 'io' dep. for py2jquast2013-09-221-11/+5
| | | | 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.
* cat(1) may display ^D\x08\x08 when ^D is used.jquast2013-09-221-1/+11
| | | | 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.
* Changes towards Python 3 compatibility.Thomas Kluyver2013-09-171-27/+40
|
* Use new style except statements in testsThomas Kluyver2013-09-171-5/+5
|
* Fix assertions that couldn't have failedThomas Kluyver2013-01-041-12/+10
|
* Moved everything up one directory level.Noah Spurrier2012-10-261-0/+217