From: david-sarah Date: Mon, 2 Aug 2010 06:25:58 +0000 (-0700) Subject: test_runner.py: add test_run_with_python_options, which checks that the Windows scrip... X-Git-Tag: allmydata-tahoe-1.8.0b2~46 X-Git-Url: https://git.rkrishnan.org/pf/content/simplejson/provisioning?a=commitdiff_plain;h=d81e8acf882a7784ed35554b0bdff97c6a423edb;p=tahoe-lafs%2Ftahoe-lafs.git test_runner.py: add test_run_with_python_options, which checks that the Windows script changes haven't broken 'python bin/tahoe'. --- diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index 414a6866..62c328ae 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -100,6 +100,19 @@ class BinTahoe(common_util.SignalMixin, unittest.TestCase, SkipMixin): d.addCallback(_cb) return d + def test_run_with_python_options(self): + self.skip_if_cannot_run_bintahoe() + + # -t is a harmless option that warns about tabs. + d = utils.getProcessOutputAndValue(sys.executable, args=['-t', bintahoe, '--version'], + env=os.environ) + 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)) + d.addCallback(_cb) + return d + def test_version_no_noise(self): self.skip_if_cannot_run_bintahoe() import pkg_resources