def testDifferentLengthOutput(self): """Check it raises error when the number of outputs is not correct. Make sure the number of outputs is the same as the number of sources. """ with self.assertRaises(AssertionError): ebuild_function.new_command('ins', ['source'], ['output1', 'output2'])
def testNewInvalidInstall(self): """Check it raises InvalidInstallTypeError when install type is invalid.""" with self.assertRaises(ebuild_function.InvalidInstallTypeError): ebuild_function.new_command('invalid', ['source'], ['output'])
def testMultipleNewins(self): """Check it returns multiple commands when there are multiple sources.""" ret = ebuild_function.new_command('ins', ['source1', 'source2'], ['output1', 'output2']) self.assertEqual(ret, [['newins', 'source1', 'output1'], ['newins', 'source2', 'output2']])
def testNewins(self): """Check it returns a newins command that contains single source file.""" ret = ebuild_function.new_command('ins', ['source'], ['output']) self.assertEqual(ret, [['newins', 'source', 'output']])