(self, *k, **kw)
| 136 | fail(msg, pytrace=False) |
| 137 | |
| 138 | def _create(self, *k, **kw): |
| 139 | try: |
| 140 | return super().__call__(*k, **kw) |
| 141 | except TypeError: |
| 142 | sig = signature(getattr(self, "__init__")) |
| 143 | known_kw = {k: v for k, v in kw.items() if k in sig.parameters} |
| 144 | from .warning_types import PytestDeprecationWarning |
| 145 | |
| 146 | warnings.warn( |
| 147 | PytestDeprecationWarning( |
| 148 | f"{self} is not using a cooperative constructor and only takes {set(known_kw)}.\n" |
| 149 | "See https://docs.pytest.org/en/stable/deprecations.html" |
| 150 | "#constructors-of-custom-pytest-node-subclasses-should-take-kwargs " |
| 151 | "for more details." |
| 152 | ) |
| 153 | ) |
| 154 | |
| 155 | return super().__call__(*k, **known_kw) |
| 156 | |
| 157 | |
| 158 | class Node(metaclass=NodeMeta): |
no test coverage detected