simplify the expression which transfers mark names to keywords

This commit is contained in:
Ronny Pfannschmidt 2019-07-12 06:16:06 +02:00
parent e98627223f
commit 13d750db20
1 changed files with 5 additions and 8 deletions

View File

@ -1399,14 +1399,11 @@ class Function(FunctionMixin, nodes.Item, fixtures.FuncargnamesCompatAttr):
# https://github.com/pytest-dev/pytest/issues/4569
self.keywords.update(
dict.fromkeys(
[
mark.name
for mark in self.iter_markers()
if mark.name not in self.keywords
],
True,
)
{
mark.name: True
for mark in self.iter_markers()
if mark.name not in self.keywords
}
)
if fixtureinfo is None: