MCPcopy Create free account
hub / github.com/pytest-dev/pytest-bdd / parse_background

Method parse_background

src/pytest_bdd/parser.py:464–471  ·  view source on GitHub ↗
(self, background_data: GherkinBackground)

Source from the content-addressed store, hash-verified

462 return scenario
463
464 def parse_background(self, background_data: GherkinBackground) -> Background:
465 background = Background(
466 line_number=background_data.location.line,
467 )
468 background.steps = self.parse_steps(background_data.steps)
469 for step in background.steps:
470 step.background = background
471 return background
472
473 def _parse_feature_file(self) -> GherkinDocument:
474 """Parse a feature file into a Feature object.

Callers 2

parseMethod · 0.95

Calls 2

parse_stepsMethod · 0.95
BackgroundClass · 0.70

Tested by

no test coverage detected