diff --git a/_pytest/skipping.py b/_pytest/skipping.py index 18e038d2c..1d557a3fe 100644 --- a/_pytest/skipping.py +++ b/_pytest/skipping.py @@ -108,11 +108,7 @@ class MarkEvaluator: def _getglobals(self): d = {'os': os, 'sys': sys, 'config': self.item.config} - func = self.item.obj - try: - d.update(func.__globals__) - except AttributeError: - d.update(func.func_globals) + d.update(self.item.obj.__globals__) return d def _istrue(self):