Skip to content

Commit af0d67a

Browse files
committed
Use instance/owner for __get__
1 parent 0303285 commit af0d67a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_pytest/fixtures.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1263,13 +1263,13 @@ def __repr__(self) -> str:
12631263
return f"<pytest_fixture({self._fixture_function})>"
12641264

12651265
def __get__(
1266-
self, obj: object, objtype: type | None = None
1266+
self, instance: object, owner: type | None = None
12671267
) -> FixtureFunctionDefinition[FixtureParams, FixtureValue]:
12681268
"""Behave like a method if the function it was applied to was a method."""
12691269
return FixtureFunctionDefinition(
12701270
function=self._fixture_function,
12711271
fixture_function_marker=self._fixture_function_marker,
1272-
instance=obj,
1272+
instance=instance,
12731273
_ispytest=True,
12741274
)
12751275

0 commit comments

Comments
 (0)