diff --git a/fcov/coverpoint.py b/fcov/coverpoint.py index e1e10ce..4264640 100644 --- a/fcov/coverpoint.py +++ b/fcov/coverpoint.py @@ -47,7 +47,6 @@ def __init__(self, name: str, description: str, trigger=None): self.setup(ctx=CoverageContext.get()) self.axis_names = [x.name for x in self.axes] - # TODO Check if goalsDict only has 1 entry goals = SimpleNamespace(**self._goal_dict) for cursor in self.all_axis_value_combinations(): bucket = SimpleNamespace(**dict(zip(self.axis_names, cursor, strict=True))) @@ -79,7 +78,8 @@ def add_goal(self, name, amount, description): self._goal_dict[formatted_name] = GoalItem(name, amount, description) def apply_goals(self, bucket=None, goals=None): - # This should be implemented by the coverpoint when requried + if len(self._goal_dict) == 1: + return self._goal_dict["DEFAULT"] raise NotImplementedError("This needs to be implemented by the coverpoint") def sample():