def testMultipleDoins(self):
    """Check it returns doins command that contains multiple source files.

    doins <source_file1> <source_file2>
    """
    ret = ebuild_function.do_command('ins', ['source1', 'source2'])
    self.assertEqual(ret, [['doins', 'source1', 'source2']])
  def testDoinsRecursive(self):
    """Check it returns recursive doins command.

    doins -r <source_file>
    """
    ret = ebuild_function.do_command('ins', ['source'], recursive=True)
    self.assertEqual(ret, [['doins', '-r', 'source']])
  def testDoins(self):
    """Check it returns doins command that contains single source file.

    doins <source_file>
    """
    ret = ebuild_function.do_command('ins', ['source'])
    self.assertEqual(ret, [['doins', 'source']])
 def testDoInvalidInstall(self):
   """Check it raises InvalidInstallTypeError when install type is invalid."""
   with self.assertRaises(ebuild_function.InvalidInstallTypeError):
     ebuild_function.do_command('invalid', ['source'])
 def testNotDoinsRecursive(self):
   """Check "recursive" is disabled in any install_type except for "ins"."""
   ret = ebuild_function.do_command('bin', ['source'], recursive=True)
   self.assertEqual(ret, [['dobin', 'source']])