Incremental housekeeping cleanup of test_misc.py

- 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
Merge pull request #78 from pexpect/improve-upon-test-misc

Incremental housekeeping cleanup of test_misc.py
Issue #82: Handle more than two numbers in ANSI sequences

FSM transitions were not set up to accept more than one digit in the
third number, or to accept more than three numbers, in ANSI sequences
such as '\x1b[...m'.  They were also not set up to capture the third
and subsequent numbers.  This fix corrects these issues and adds a
unit test.
Merge pull request #87 from dcoshea/issue-82

Issue #82: Handle more than two numbers in ANSI sequences
Issue #85: Don't leave unwanted numbers in ANSI FSM stack/memory.

The FSM transitions set up by ANSI accept a number of escape sequences
that accept one or more numeric parameters where the escape sequence
as a whole is ignored (no action is executed at the end of the
sequence).  This means that the numeric parameters are left on the
FSM's stack, making it harder to improve or subclass ANSI to handle
any of the sequences that take multiple numeric parameters, where it
is necessary to look at the entire stack rather than just, say, pop
one element off the top of the stack.

This fix sets up handlers that discard all items on the stack other
than the bottom-most, which is a reference to the ANSI instance
itself.  The handlers are created as members of ANSI, rather than
methods in the ANSI package, so that they can be overridden in
subclasses without needing to replace FSM transitions.

A unit test is added to verify the new behavior, and the existing
test_number_x() unit test is modified to no longer expect the
parameters to be left on the stack after parsing, and instead use a
subclass of ANSI to capture them.
Update commonissues.rst

Fixed minor typo in "Controlling SSH on Solaris" usage section.
Merge pull request #93 from joedougherty/patch-1

Update commonissues.rst
Address review comment (no parens around assert statement arguments).
Merge pull request #89 from dcoshea/issue-85-try2

Issue #85: Don't leave unwanted numbers in ANSI FSM stack/memory.
Issue #84: Unicode support in screen and ANSI.

This commit updates the the screen and ANSI modules to support Unicode
under Python 2.x.  Under Python 3.x, it was already supported because
strings are Unicode by default.  Now, on both Python versions:

- The constructors accept a codec name (defaults to 'latin-1') and a
  scheme for handling encoding/decoding errors (defaults to
  'replace').  The codec may be set to None to inhibit
  encoding/decoding.

- Unicode is now used internally for storing the screen contents.

- Methods that accept input characters will, if passed input of type
  'bytes' (or, under Python 2.x, 'str'), use the specified codec to
  decode the input, otherwise treating it as Unicode.

- Methods that return screen contents now return Unicode, with the
  exception of __str__() under Python 2.x, and __bytes__() in all
  versions of Python, which return the screen contents encoded using
  the specified codec.

These changes are designed to work only with Python 2.6, 2.7, and 3.3
and later, specifically versions that provide both b'' and u'' string
literals.

The check in ANSI for characters being printable is also removed, as
this prevents non-ASCII characters being accepted, which is not
compatible with the goal of adding Unicode support.  This addresses
issue #83.
Rename codec and codec_errors to encoding and encoding_errors respectively.
Disable Python 3.2 builds in Travis as changes only support 2.6, 2.7 and 3.3+.
Don't define __bytes__(), and don't define __unicode__() on Python 3.

The previous attempt to add unicode support tried to make Python 2 and
3 behave in the same way apart from __str__().  This commit makes the
modules, and the tests, provide only __str__() on Python 3 and both
__str__() and __unicode__() on Python 2.
Change SPACE to be a unicode string.
Fix problems found in review.
Address review comments regarding referring to "unicode strings" in docstrings.
Some changes based on reviewing the code
update documentation string in pexpect/__init__.py to be compatible with python 2 and 3
Merge pull request #101 from BrianOn99/py3docstring

update documentation string in pexpect/__init__.py to be compatible with...
Closes issue #86 and issue #100

Fallback to using stdout, and, when both stdin
and stdout are *both* closed, catch ValueError
and use the same constants as when the attached
process is not a terminal.