Use correct stream

If stream is None, write the value of StringIO to sys.stderr.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
Pass corret stream to TestTextRunner

If stream is not None, add it to kwargs and pass it to TestTextRunner.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>