Represents the background steps for a feature. Attributes: line_number (int): The line number where the background starts in the file. steps (List[Step]): The list of steps in the background.
| 343 | |
| 344 | @dataclass(eq=False) |
| 345 | class Background: |
| 346 | """Represents the background steps for a feature. |
| 347 | |
| 348 | Attributes: |
| 349 | line_number (int): The line number where the background starts in the file. |
| 350 | steps (List[Step]): The list of steps in the background. |
| 351 | """ |
| 352 | |
| 353 | line_number: int |
| 354 | steps: list[Step] = field(init=False, default_factory=list) |
| 355 | |
| 356 | def add_step(self, step: Step) -> None: |
| 357 | """Add a step to the background. |
| 358 | |
| 359 | Args: |
| 360 | step (Step): The step to add. |
| 361 | """ |
| 362 | step.background = self |
| 363 | self.steps.append(step) |
| 364 | |
| 365 | |
| 366 | class FeatureParser: |
no outgoing calls
no test coverage detected
searching dependent graphs…