From 1fc185b6405e63df37eb16bbbc62c0ed50d84f21 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 5 Sep 2017 19:28:39 -0300 Subject: [PATCH] Add comment about possible future refactoring in the fixture mechanism --- _pytest/compat.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_pytest/compat.py b/_pytest/compat.py index eaa270a56..e980128ed 100644 --- a/_pytest/compat.py +++ b/_pytest/compat.py @@ -83,6 +83,11 @@ def num_mock_patch_args(function): def getfuncargnames(function, startindex=None, cls=None): + """ + @RonnyPfannschmidt: This function should be refactored when we revisit fixtures. The + fixture mechanism should ask the node for the fixture names, and not try to obtain + directly from the function object well after collection has occurred. + """ if startindex is None and cls is not None: is_staticmethod = isinstance(cls.__dict__.get(function.__name__, None), staticmethod) startindex = 0 if is_staticmethod else 1