Skip to content

Commit

Permalink
Merge pull request pytest-dev#10056 from paulreece/fixture-path-doc-fix
Browse files Browse the repository at this point in the history
Added Docstring description for the Path property of FixtureRequest pytest-dev#9975
  • Loading branch information
nicoddemus committed Jun 25, 2022
2 parents 2b70e7f + cdc287d commit aafac55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ Oscar Benjamin
Parth Patel
Patrick Hayes
Paul Müller
Paul Reece
Pauli Virtanen
Pavel Karateev
Paweł Adamczak
Expand Down
1 change: 1 addition & 0 deletions src/_pytest/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ def module(self):

@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.
Expand Down

0 comments on commit aafac55

Please sign in to comment.