mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 14:52:26 +00:00
Merge pull request #664 from tahoe-lafs/3262.tests-broken-by-deprecations
Fix tests broken by deprecation warnings
This commit is contained in:
commit
5e25da3261
0
newsfragments/3262.minor
Normal file
0
newsfragments/3262.minor
Normal file
@ -170,21 +170,6 @@ class BinTahoe(common_util.SignalMixin, unittest.TestCase, RunBinTahoeMixin):
|
||||
d.addCallback(_cb)
|
||||
return d
|
||||
|
||||
def test_version_no_noise(self):
|
||||
d = self.run_bintahoe(["--version"])
|
||||
def _cb(res):
|
||||
out, err, rc_or_sig = res
|
||||
self.failUnlessEqual(rc_or_sig, 0, str(res))
|
||||
self.failUnless(out.startswith(allmydata.__appname__+':'), str(res))
|
||||
self.failIfIn("DeprecationWarning", out, str(res))
|
||||
errlines = err.split("\n")
|
||||
self.failIf([True for line in errlines if (line != "" and "UserWarning: Unbuilt egg for setuptools" not in line
|
||||
and "from pkg_resources import load_entry_point" 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
|
||||
|
||||
@inlineCallbacks
|
||||
def test_help_eliot_destinations(self):
|
||||
out, err, rc_or_sig = yield self.run_bintahoe(["--help-eliot-destinations"])
|
||||
|
@ -2428,7 +2428,9 @@ class SystemTest(SystemTestMixin, RunBinTahoeMixin, unittest.TestCase):
|
||||
|
||||
def _run_in_subprocess(ignored, verb, *args, **kwargs):
|
||||
stdin = kwargs.get("stdin")
|
||||
env = kwargs.get("env")
|
||||
env = kwargs.get("env", os.environ)
|
||||
# Python warnings from the child process don't matter.
|
||||
env["PYTHONWARNINGS"] = "ignore"
|
||||
newargs = ["--node-directory", self.getdir("client0"), verb] + list(args)
|
||||
return self.run_bintahoe(newargs, stdin=stdin, env=env)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user