def test_pull_invalid_dependency(self, compilers_mock): plugin = catkin.CatkinPlugin('test-part', self.properties, self.project_options) os.makedirs(os.path.join(plugin.sourcedir, 'src')) self.dependencies_mock.return_value = ['foo'] mock_instance = self.ubuntu_mock.return_value mock_instance.get.side_effect = repo.PackageNotFoundError('foo') raised = self.assertRaises(RuntimeError, plugin.pull) self.assertEqual( str(raised), 'Failed to fetch system dependencies: The Ubuntu ' "package 'foo' was not found.")
def test_pull_invalid_dependency(self): plugin = catkin.CatkinPlugin('test-part', self.properties) os.makedirs(os.path.join(plugin.sourcedir, 'src')) self.dependencies_mock.return_value = ['foo'] mock_instance = self.ubuntu_mock.return_value mock_instance.get.side_effect = repo.PackageNotFoundError('foo') with self.assertRaises(RuntimeError) as raised: plugin.pull() self.assertEqual( str(raised.exception), 'Failed to fetch system dependencies: The Ubuntu ' 'package "foo" was not found')