Commit db48dbe1 authored by Lisandro Dalcin's avatar Lisandro Dalcin

fix for unittest changes in upcoming Py2.7 and Py3.2

parent 1f956c69
......@@ -427,9 +427,14 @@ class _FakeClass(object):
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
class PartialTestResult(unittest._TextTestResult):
try: # Py2.7+ and Py3.2+
from unittest.runner import _TextTestResult
except ImportError:
from unittest import _TextTestResult
class PartialTestResult(_TextTestResult):
def __init__(self, base_result):
unittest._TextTestResult.__init__(
_TextTestResult.__init__(
self, self._StringIO(), True,
base_result.dots + base_result.showAll*2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment