From e9bb1aa233c882de53172cdd5e762a8a49e427a7 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Thu, 7 Oct 2021 00:42:43 +0300 Subject: [PATCH] python: be consistent with what value marks have in keywords Marks are added to keywords in three places: - `Node.add_marker`: name -> `Mark` - `Function.__init__(callspec)`: name -> `Mark` - `Function.__init__ iter_markers`: name -> True I think it should be consistent, which will also help with some upcoming code cleaning. The `Mark` seems more useful than just a `True`, so switch to that. --- src/_pytest/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/python.py b/src/_pytest/python.py index 98c28b3d2..d07c01d7b 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -1675,7 +1675,7 @@ class Function(PyobjMixin, nodes.Item): self.keywords.update( { - mark.name: True + mark.name: mark for mark in self.iter_markers() if mark.name not in self.keywords }