From: david-sarah Date: Mon, 2 Aug 2010 01:35:26 +0000 (-0700) Subject: test_runner.py: Fix error in message arguments to 'fail' calls. X-Git-Url: https://git.rkrishnan.org/uri/sub?a=commitdiff_plain;h=9aae9208e36e32d46cf246b1641329fb8534944b;p=tahoe-lafs%2Ftahoe-lafs.git test_runner.py: Fix error in message arguments to 'fail' calls. --- diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index 74203933..458a7017 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -37,13 +37,13 @@ class BinTahoe(common_util.SignalMixin, unittest.TestCase, SkipMixin): d = utils.getProcessOutputAndValue(bintahoe, args=["--version-and-path"], env=os.environ) def _cb(res): out, err, rc_or_sig = res - self.failUnlessEqual(rc_or_sig, 0, str((out, err, rc_or_sig))) + self.failUnlessEqual(rc_or_sig, 0, str(res)) # Fail unless the package is *this* version *and* was loaded from *this* source directory. ad = os.path.dirname(os.path.dirname(os.path.realpath(allmydata.__file__))) required_ver_and_path = "%s: %s (%s)" % (allmydata.__appname__, allmydata.__version__, ad) self.failUnless(out.startswith(required_ver_and_path), - (out, err, rc_or_sig, required_ver_and_path)) + str((out, err, rc_or_sig, required_ver_and_path))) d.addCallback(_cb) return d @@ -58,10 +58,10 @@ class BinTahoe(common_util.SignalMixin, unittest.TestCase, SkipMixin): d = utils.getProcessOutputAndValue(bintahoe, args=["--version"], env=os.environ) def _cb(res): out, err, rc_or_sig = res - self.failUnlessEqual(rc_or_sig, 0, res) - self.failUnless(out.startswith(allmydata.__appname__+':'), res) - self.failIfIn("DeprecationWarning", out, res) - self.failUnlessEqual(err, "", res) + self.failUnlessEqual(rc_or_sig, 0, str(res)) + self.failUnless(out.startswith(allmydata.__appname__+':'), str(res)) + self.failIfIn("DeprecationWarning", out, str(res)) + self.failUnlessEqual(err, "", str(res)) d.addCallback(_cb) return d