def testAddOptionAndValue(self): """Tests adding an option with a value.""" self.assertListEqual( ['brillo', 'chroot', '--brick', '//foo', 'ls'], commandline._AddCliCommandOption(['brillo', 'chroot', 'ls'], '--brick', '//foo'))
def testInvalidArg(self): """Tests that trying to add a positional arg fails.""" with self.assertRaises(ValueError): commandline._AddCliCommandOption(['brillo', 'chroot', 'ls'], 'positional')
def testAddOption(self): """Tests adding an option without a value.""" self.assertListEqual( ['brillo', 'chroot', '--debug', 'ls'], commandline._AddCliCommandOption(['brillo', 'chroot', 'ls'], '--debug'))