]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_runner.py: add test_run_with_python_options, which checks that the Windows scrip...
authordavid-sarah <david-sarah@jacaranda.org>
Mon, 2 Aug 2010 06:25:58 +0000 (23:25 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Mon, 2 Aug 2010 06:25:58 +0000 (23:25 -0700)
src/allmydata/test/test_runner.py

index 414a686618c6a4d79730e3b201feefe6aee94c25..62c328ae963cff053e027085f6f15ba18c1a8c9e 100644 (file)
@@ -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