Skip to content

Commit

Permalink
default apply goals when only default goal
Browse files Browse the repository at this point in the history
  • Loading branch information
Kotarski committed Nov 17, 2023
1 parent ade9544 commit 5e7cb44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fcov/coverpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def __init__(self, name: str, description: str, trigger=None):
self.setup()

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)))
Expand Down Expand Up @@ -74,7 +73,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():
Expand Down

0 comments on commit 5e7cb44

Please sign in to comment.