diff --git a/AUTHORS b/AUTHORS index 9144f43be..2d3439b6c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -262,6 +262,7 @@ Oscar Benjamin Parth Patel Patrick Hayes Paul Müller +Paul Reece Pauli Virtanen Pavel Karateev Paweł Adamczak diff --git a/src/_pytest/fixtures.py b/src/_pytest/fixtures.py index fc6539db0..32c3ec4b0 100644 --- a/src/_pytest/fixtures.py +++ b/src/_pytest/fixtures.py @@ -486,6 +486,7 @@ class FixtureRequest: @property def path(self) -> Path: + """Path where the test function was collected.""" if self.scope not in ("function", "class", "module", "package"): raise AttributeError(f"path not available in {self.scope}-scoped context") # TODO: Remove ignore once _pyfuncitem is properly typed.