def test_global_error_is_caught(self, entry_points, entry_point): entry_point.load.side_effect = Exception() groups = load_entry_points("global") assert groups == [] entry_points.assert_called_once_with(group="kedro.global_commands")
def test_global_error_is_caught(self, entry_points, entry_point): entry_point.load.side_effect = Exception() with raises(KedroCliError, match="Loading global commands from"): load_entry_points("global") entry_points.assert_called_once_with(group="kedro.global_commands")
def test_global_groups(self, entry_points, entry_point): entry_point.load.return_value = "groups" groups = load_entry_points("global") assert groups == ["groups"] entry_points.assert_called_once_with(group="kedro.global_commands")
def test_project_error_is_caught(self, entry_points, entry_point): entry_point.load.side_effect = Exception() with raises(KedroCliError, match="Loading project commands"): load_entry_points("project") entry_points.assert_called_once_with(group="kedro.project_commands")