Example #1
0
 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'])
Example #2
0
 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'])
Example #3
0
 def test_synopsis(self):
     opts = runner.TryOptions()
     self.assertIn('buildbot try', opts.getSynopsis())
Example #4
0
 def parse(self, *args):
     self.opts = runner.TryOptions()
     self.opts.parseOptions(args)
     return self.opts