Skip to content

Commit c081c0f

Browse files
fix fixture lookup triggering the TerminalWriter.writer deprecation
1 parent 244c8e4 commit c081c0f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/_pytest/fixtures.py

+5
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,11 @@ def parsefactories(self, node_or_obj, nodeid=NOTSET, unittest=False):
14131413
for name in dir(holderobj):
14141414
# The attribute can be an arbitrary descriptor, so the attribute
14151415
# access below can raise. safe_getatt() ignores such exceptions.
1416+
# additionally properties are ignored by default to avoid triggering warnings
1417+
if not isinstance(holderobj, type) and isinstance(
1418+
safe_getattr(holderobj.__class__, name, None), property
1419+
):
1420+
continue
14161421
obj = safe_getattr(holderobj, name, None)
14171422
marker = getfixturemarker(obj)
14181423
if not isinstance(marker, FixtureFunctionMarker):

0 commit comments

Comments
 (0)