def test_builder9(self): """test unset option (set to None)""" builder = Builder() builder.abc = 'def' builder.test = 'test123' builder.jobs = 42 builder.abc = None builder.jobs = None self.assertEqual(builder.opts(), ['--test', 'test123'])
def test_builder11(self): """test unset option (set to None via del)""" builder = Builder() builder.abc = 'def' builder.test = 'test123' builder.jobs = 42 del builder.abc del builder.jobs self.assertEqual(builder.opts(), ['--test', 'test123'])
def test_builder10(self): """test unset option (set to None via set)""" builder = Builder() builder.abc = 'def' builder.test = 'test123' builder.jobs = 42 builder.set('abc', None) builder.set('jobs', None) self.assertEqual(builder.opts(), ['--test', 'test123'])
def test_builder1(self): """test options 1""" builder = Builder() builder.jobs = 2 builder.debug = True builder.no_init = True builder.root = '/var/tmp/build-root' exp_opts = ['--debug', '--jobs', '2', '--no-init', '--root', '/var/tmp/build-root'] self.assertEqual(builder.opts(), exp_opts)
def test_builder12(self): """test constructor parameters""" builder = Builder(rpmlist='/path/to/rpmlist', jobs=2, root='/var/tmp/build-root', arch='x86_64', config='/path/to/buildconfig') # overwrite jobs builder.jobs = 3 exp_opts = ['--arch', 'x86_64', '--config', '/path/to/buildconfig', '--jobs', '3', '--root', '/var/tmp/build-root', '--rpmlist', '/path/to/rpmlist'] self.assertEqual(builder.opts(), exp_opts)
def test_builder1(self): """test options 1""" builder = Builder() builder.jobs = 2 builder.debug = True builder.no_init = True builder.root = '/var/tmp/build-root' exp_opts = [ '--debug', '--jobs', '2', '--no-init', '--root', '/var/tmp/build-root' ] self.assertEqual(builder.opts(), exp_opts)
def test_builder12(self): """test constructor parameters""" builder = Builder(rpmlist='/path/to/rpmlist', jobs=2, root='/var/tmp/build-root', arch='x86_64', config='/path/to/buildconfig') # overwrite jobs builder.jobs = 3 exp_opts = [ '--arch', 'x86_64', '--config', '/path/to/buildconfig', '--jobs', '3', '--root', '/var/tmp/build-root', '--rpmlist', '/path/to/rpmlist' ] self.assertEqual(builder.opts(), exp_opts)