Added convenient methods in BaseController and Controller.
Move all convenience functions to Controller class, and minor changes on them
Added convenient methods in BaseController and Controller.
Move all convenience functions to Controller class, and minor changes on them
Added integ tests for convenience methods.
Fixed indentation errors.
Couple fixes for prior controller changes

Two minor bugs...
- our version parsing was broken for versions without a space in them
- we were quoting the runner password constant rather than using it, breaking
  the RUN_PASSWORD target

Also some minor whitespace tweaks and moving imports to the start of the file
(we're only doing method level imports if doing otherwise would break things).
We might change our import style later to resolve our circular imports, but
that'll be a project-wide change.
Adding --test argument to selectively run tests

Adding an argument that'll only run tests matching the given module prefix.
This is to make it faster to write new tests (so we don't need to wait a minute
for the full integ suite to run each time).

Also adding examples to the '--help' output and rearranging the options so
'--config' is at the end (it isn't especially useful and may be dropped in the
future.
Dumbing down syntax for python 2.5

Evidently even with the 'with' keyword's future import it still chokes on comma
delimited entries (instead you need to do nested 'with' blocks). Ick. Oh well,
if that's all we need to maintain 2.5 compatability then I'll be happy.

It's a pity we can't tell python 'run in 2.5 compatability mode' to check for
these things. I doubt that we'll remember to run against a 2.5 instance to keep
stem working there. Oh well, guess this is a problem that'll need to be
addressed when figuring out a release procedure.
Tor executable shouldn't be needed for unit tests

We only need a tor variable when running the integ tests. Dropping the check
that it exists in our path if we're just running the unit tests.
Adding module to check for requirements

Stem requires at least python 2.5, and beyond that our python version and
modules does impact what functionality we have available (yay). Adding a module
for tracking what we have available.
The followlinks arg of os.walk needs python 2.6

We were using the 'followlinks' argument two places: in the descriptor reader
and whitespace checker. For the former I'm noting that 2.6 is a requirement for
the argument and coding around it to work on 2.5. For the later I don't really
care if the whitespace checker follows links so I'm simply dropping the arg.
Adding todo notes around the stupid concessions to 2.5

I hate dirtying our code for ye old python 2.5. It's ancient and that fact
isn't getting rosier very fast. However, a lot of people still use it so we
should still support it for now. This won't always be the case so including
TODO notes to remove these icky bits when we drop compatability for it.
Tuples lack an index method in python 2.5

Yet another python 2.5 compatability hack.
Patched mocking.mock() to handle standard library functions

Although standard library functions have the same type as built-in functions,
they cannot be mocked using the same setattr approach.  To fix this, we patched
mocking.mock() to first look for built-in functions, then to handle
non-built-in functions with the same type as built-in functions. This will
catch standard library functions and mock them appropriately.

This change is an adaptation of one submitted by Erik Islo and Megan Chang.
TestCase's skipTest method unavailable before python 2.7

Blarg! The unit testing's skipTest method was a new addition in python 2.7.
This is especially pesky since skipTest alters the control flow of the tests
(raising an exception so we can place it in setUp methods).

Options are to either monkey patch support into our testing module (ick!) or
add a fallback everywhere we use skipTest. This change adds a best-effort skip
method to the runner, then leaves it to the caller to return out of the method
(reporting success for skipped tests).

Sucks, but best that we can do until we drop *both* python 2.5 and 2.6
compatability, which probably won't happen until we finally move to the 3.x
series.
Changed mocking.mock() to accomodate modules that link to other modules.

We ran into a problem mocking os.readlink as in certain unix environments
os links to an outside module, posix.  This resulted in the __dict__ of
readlink remaining unchanged, and thus not mocking the realink function
(which in our environment resides in the posix module).  To patch this,
we added a third argument to mock() that can be used to explicitly
specify the target_module.  A default value of None is provided so all
prior calls on this method are compatible.
Adding pydocs for prior mocking change
Disable ANSI escape sequences in windows
Uses stem.util.system.is_windows() for platform checking in run_tests.py