From 9c3bc106dd522acbc70d13d2d31866f5d969320f Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 25 Jun 2022 20:55:23 -0300 Subject: [PATCH 1/2] [7.1.x] Added Docstring description for the Path property of FixtureRequest #9975 --- AUTHORS | 1 + src/_pytest/fixtures.py | 1 + 2 files changed, 2 insertions(+) diff --git a/AUTHORS b/AUTHORS index 6f623555c..8e2afc3d5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -257,6 +257,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 ee3e93f19..e11481a76 100644 --- a/src/_pytest/fixtures.py +++ b/src/_pytest/fixtures.py @@ -491,6 +491,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. From a1027af1689be3779298d305af6ea51f616527b8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 26 Jun 2022 01:31:08 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/en/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/en/conf.py b/doc/en/conf.py index 0022363b2..3c26b8ce0 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -320,7 +320,9 @@ latex_domain_indices = False # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [("how-to/usage", "pytest", "pytest usage", ["holger krekel at merlinux eu"], 1)] +man_pages = [ + ("how-to/usage", "pytest", "pytest usage", ["holger krekel at merlinux eu"], 1) +] # -- Options for Epub output ---------------------------------------------------