From ced1316bc80454d461df1ce1a281844e273e7dda Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Mon, 19 Mar 2018 17:40:55 +0100 Subject: [PATCH] add docstrings for nodemarkers --- _pytest/mark/structures.py | 8 ++++++++ _pytest/nodes.py | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/_pytest/mark/structures.py b/_pytest/mark/structures.py index 3236c7828..9b1411acf 100644 --- a/_pytest/mark/structures.py +++ b/_pytest/mark/structures.py @@ -369,6 +369,14 @@ class NodeKeywords(MappingMixin): @attr.s(cmp=False, hash=False) class NodeMarkers(object): + """ + internal strucutre for storing marks belongong to a node + + ..warning:: + + unstable api + + """ own_markers = attr.ib(default=attr.Factory(list)) def update(self, add_markers): diff --git a/_pytest/nodes.py b/_pytest/nodes.py index bd141ae7c..0e08c1c28 100644 --- a/_pytest/nodes.py +++ b/_pytest/nodes.py @@ -183,7 +183,10 @@ class Node(object): self._markers.update([marker]) def find_markers(self, name): - """find all marks with the given name on the node and its parents""" + """find all marks with the given name on the node and its parents + + :param str name: name of the marker + """ for node in reversed(self.listchain()): for mark in node._markers.find(name): yield mark