summaryrefslogtreecommitdiff
path: root/lib/subunit/python/testtools/tests/helpers.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-03-31 03:19:18 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-03-31 03:19:18 +0200
commita8ac7fda573a924debf165d39eff3c1837240d4f (patch)
tree6085df961a5fbcc57a240d7065d2fc4a258cf170 /lib/subunit/python/testtools/tests/helpers.py
parente4af3afd7ae3e39218b42a42d39c2ec10be9a642 (diff)
downloadsamba-a8ac7fda573a924debf165d39eff3c1837240d4f.tar.gz
samba-a8ac7fda573a924debf165d39eff3c1837240d4f.tar.bz2
samba-a8ac7fda573a924debf165d39eff3c1837240d4f.zip
Put testtools directly under lib/ to make it easier to install from Samba 4.
Diffstat (limited to 'lib/subunit/python/testtools/tests/helpers.py')
-rw-r--r--lib/subunit/python/testtools/tests/helpers.py67
1 files changed, 0 insertions, 67 deletions
diff --git a/lib/subunit/python/testtools/tests/helpers.py b/lib/subunit/python/testtools/tests/helpers.py
deleted file mode 100644
index c4cf10c736..0000000000
--- a/lib/subunit/python/testtools/tests/helpers.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright (c) 2008 Jonathan M. Lange. See LICENSE for details.
-
-"""Helpers for tests."""
-
-import sys
-
-__metaclass__ = type
-__all__ = [
- 'LoggingResult',
- ]
-
-from testtools import TestResult
-
-
-try:
- raise Exception
-except Exception:
- an_exc_info = sys.exc_info()
-
-# Deprecated: This classes attributes are somewhat non deterministic which
-# leads to hard to predict tests (because Python upstream are changing things.
-class LoggingResult(TestResult):
- """TestResult that logs its event to a list."""
-
- def __init__(self, log):
- self._events = log
- super(LoggingResult, self).__init__()
-
- def startTest(self, test):
- self._events.append(('startTest', test))
- super(LoggingResult, self).startTest(test)
-
- def stopTest(self, test):
- self._events.append(('stopTest', test))
- super(LoggingResult, self).stopTest(test)
-
- def addFailure(self, test, error):
- self._events.append(('addFailure', test, error))
- super(LoggingResult, self).addFailure(test, error)
-
- def addError(self, test, error):
- self._events.append(('addError', test, error))
- super(LoggingResult, self).addError(test, error)
-
- def addSkip(self, test, reason):
- self._events.append(('addSkip', test, reason))
- super(LoggingResult, self).addSkip(test, reason)
-
- def addSuccess(self, test):
- self._events.append(('addSuccess', test))
- super(LoggingResult, self).addSuccess(test)
-
- def startTestRun(self):
- self._events.append('startTestRun')
- super(LoggingResult, self).startTestRun()
-
- def stopTestRun(self):
- self._events.append('stopTestRun')
- super(LoggingResult, self).stopTestRun()
-
- def done(self):
- self._events.append('done')
- super(LoggingResult, self).done()
-
-# Note, the following three classes are different to LoggingResult by
-# being fully defined exact matches rather than supersets.
-from testtools.testresult.doubles import *