(self, module_or_class, name: str)
| 428 | return opts |
| 429 | |
| 430 | def parse_hookspec_opts(self, module_or_class, name: str): |
| 431 | opts = super().parse_hookspec_opts(module_or_class, name) |
| 432 | if opts is None: |
| 433 | method = getattr(module_or_class, name) |
| 434 | |
| 435 | if name.startswith("pytest_"): |
| 436 | # todo: deprecate hookspec hacks |
| 437 | # https://github.com/pytest-dev/pytest/issues/4562 |
| 438 | known_marks = {m.name for m in getattr(method, "pytestmark", [])} |
| 439 | opts = { |
| 440 | "firstresult": hasattr(method, "firstresult") |
| 441 | or "firstresult" in known_marks, |
| 442 | "historic": hasattr(method, "historic") |
| 443 | or "historic" in known_marks, |
| 444 | } |
| 445 | return opts |
| 446 | |
| 447 | def register( |
| 448 | self, plugin: _PluggyPlugin, name: Optional[str] = None |
nothing calls this directly
no outgoing calls
no test coverage detected