From: david-sarah Date: Wed, 19 Jan 2011 02:02:39 +0000 (-0800) Subject: Add src/allmydata/test/trialtest.py needed by tests for 'tahoe debug trial'. refs... X-Git-Tag: allmydata-tahoe-1.8.2b1~46 X-Git-Url: https://git.rkrishnan.org/vdrive/%22news.html/frontends/specifications/install.html?a=commitdiff_plain;h=1819c25c888ac3e6a9d16bbf7166967db9906dc0;p=tahoe-lafs%2Ftahoe-lafs.git Add src/allmydata/test/trialtest.py needed by tests for 'tahoe debug trial'. refs #1296 --- diff --git a/src/allmydata/test/trialtest.py b/src/allmydata/test/trialtest.py new file mode 100644 index 00000000..312cc8b6 --- /dev/null +++ b/src/allmydata/test/trialtest.py @@ -0,0 +1,30 @@ + +# This is a dummy test suite that we can use to check that 'tahoe debug trial' +# is working properly. Since the module name does not start with 'test_', it +# will not be run by the main test suite. + +from twisted.trial import unittest +from twisted.internet import defer + + +class Success(unittest.TestCase): + def test_succeed(self): + pass + + def test_skip(self): + raise unittest.SkipTest('skip') + + def test_todo(self): + self.fail('umm') + test_todo.todo = 'never mind' + + +class Failure(unittest.TestCase): + def test_fail(self): + self.fail('fail') + + def test_error(self): + raise AssertionError('clang') + + def test_deferred_error(self): + return defer.fail(AssertionError('screech')) \ No newline at end of file