Skip to content

Commit 887f1a1

Browse files
python Function instance: remove duplicate code
1 parent 988eb6a commit 887f1a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_pytest/python.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1634,8 +1634,8 @@ def instance(self) -> Any | None:
16341634
try:
16351635
return self._instance
16361636
except AttributeError:
1637+
# Each Function gets a fresh class instance.
16371638
self._instance = self._getinstance()
1638-
16391639
return self._instance
16401640

16411641
def _getinstance(self) -> Any | None:

0 commit comments

Comments
 (0)