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

Method __init__

src/_pytest/assertion/rewrite.py:665–677  ·  view source on GitHub ↗
(
        self, module_path: Optional[str], config: Optional[Config], source: bytes
    )

Source from the content-addressed store, hash-verified

663 """
664
665 def __init__(
666 self, module_path: Optional[str], config: Optional[Config], source: bytes
667 ) -> None:
668 super().__init__()
669 self.module_path = module_path
670 self.config = config
671 if config is not None:
672 self.enable_assertion_pass_hook = config.getini(
673 "enable_assertion_pass_hook"
674 )
675 else:
676 self.enable_assertion_pass_hook = False
677 self.source = source
678
679 def run(self, mod: ast.Module) -> None:
680 """Find all assert statements in *mod* and rewrite them."""

Callers

nothing calls this directly

Calls 1

getiniMethod · 0.45

Tested by

no test coverage detected