Skip to content

Commit fe64939

Browse files
committed
python: clarify a bit two comments
1 parent 19bc2cb commit fe64939

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/_pytest/python.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,14 +1270,13 @@ def parametrize(
12701270
if _param_mark and _param_mark._param_ids_from and generated_ids is None:
12711271
object.__setattr__(_param_mark._param_ids_from, "_param_ids_generated", ids)
12721272

1273-
# Add funcargs as fixturedefs to fixtureinfo.arg2fixturedefs by registering
1274-
# artificial "pseudo" FixtureDef's so that later at test execution time we can
1275-
# rely on a proper FixtureDef to exist for fixture setup.
1273+
# Add direct parametrizations as fixturedefs to arg2fixturedefs by
1274+
# registering artificial "pseudo" FixtureDef's such that later at test
1275+
# setup time we can rely on FixtureDefs to exist for all argnames.
12761276
node = None
1277-
# If we have a scope that is higher than function, we need
1278-
# to make sure we only ever create an according fixturedef on
1279-
# a per-scope basis. We thus store and cache the fixturedef on the
1280-
# node related to the scope.
1277+
# For scopes higher than function, a "pseudo" FixtureDef might have
1278+
# already been created for the scope. We thus store and cache the
1279+
# FixtureDef on the node related to the scope.
12811280
if scope_ is not Scope.Function:
12821281
collector = self.definition.parent
12831282
assert collector is not None

0 commit comments

Comments
 (0)