test_runner.py: if the only noise is 'UserWarning: Unbuilt egg for setuptools', skip instead of failing the no_noise tests. This version avoids 'any' to be compatible with Python < 2.5. refs #1235.

This commit is contained in:
david-sarah 2010-10-29 12:18:04 -07:00
parent 2610f8e0aa
commit 8c95f88b4f

View File

@ -157,7 +157,10 @@ class BinTahoe(common_util.SignalMixin, unittest.TestCase, SkipMixin):
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))
errlines = err.split("\n")
self.failIf([True for line in errlines if line != "" and ("UserWarning: Unbuilt egg for setuptools" not in line)], str(res))
if err != "":
raise unittest.SkipTest("This test is known not to pass on Ubuntu Lucid; see #1235.")
d.addCallback(_cb)
return d
@ -439,7 +442,10 @@ class RunNode(common_util.SignalMixin, unittest.TestCase, pollmixin.PollMixin,
open(HOTLINE_FILE, "w").write("")
self.failUnlessEqual(rc_or_sig, 0, errstr)
self.failUnlessEqual(out, "", errstr) # If you emit noise, you fail this test.
self.failUnlessEqual(err, "", errstr)
errlines = err.split("\n")
self.failIf([True for line in errlines if line != "" and ("UserWarning: Unbuilt egg for setuptools" not in line)], errstr)
if err != "":
raise unittest.SkipTest("This test is known not to pass on Ubuntu Lucid; see #1235.")
# the parent (twistd) has exited. However, twistd writes the pid
# from the child, not the parent, so we can't expect twistd.pid