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