def testGetopt4(self): opts = "try_connect = 'ssh'\n" + "try_builders = ['a']\n" self.makeOptions(opts) config = runner.TryOptions() config.parseOptions(['--builder=b']) t = tryclient.Try(config) self.failUnlessEqual(t.connect, "ssh") self.failUnlessEqual(t.builderNames, ['b'])
def testGetopt2(self): opts = "" self.makeOptions(opts) config = runner.TryOptions() config.parseOptions(['--connect=ssh', '--builder', 'a']) t = tryclient.Try(config) self.failUnlessEqual(t.connect, "ssh") self.failUnlessEqual(t.builderNames, ['a'])
def test_synopsis(self): opts = runner.TryOptions() self.assertIn('buildbot try', opts.getSynopsis())
def parse(self, *args): self.opts = runner.TryOptions() self.opts.parseOptions(args) return self.opts