From: david-sarah Date: Tue, 27 Sep 2011 22:53:36 +0000 (-0700) Subject: test/test_runner.py: BinTahoe.test_path has rare nondeterministic failures; this... X-Git-Url: https://git.rkrishnan.org/frontends//%22%22.?a=commitdiff_plain;h=5ba0529b878c2535d726b8d696551c7ef3f4e77a;p=tahoe-lafs%2Ftahoe-lafs.git test/test_runner.py: BinTahoe.test_path has rare nondeterministic failures; this patch probably fixes a problem where the actual cause of failure is masked by a string conversion error. --- diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index b2b57dfd..51b4b04f 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -150,14 +150,16 @@ class BinTahoe(common_util.SignalMixin, unittest.TestCase, RunBinTahoeMixin): "with a _version.py and 'setup.py darcsver' hasn't been run.") srcdir = os.path.dirname(os.path.dirname(os.path.normcase(os.path.realpath(srcfile)))) - info = (res, allmydata.__appname__, required_verstr, srcdir) + info = repr((res, allmydata.__appname__, required_verstr, srcdir)) appverpath = out.split(')')[0] (appver, path) = appverpath.split(' (') (app, ver) = appver.split(': ') self.failUnlessEqual(app, allmydata.__appname__, info) - self.failUnlessEqual(normalized_version(ver), normalized_version(required_verstr), info) + norm_ver = normalized_version(ver) + norm_required = normalized_version(required_verstr) + self.failUnlessEqual(norm_ver, norm_required, info) self.failUnlessEqual(path, srcdir, info) d.addCallback(_cb) return d