Skip to content

Commit b868b76

Browse files
Fix a bug
1 parent 882f336 commit b868b76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_pytest/fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,11 @@ def get_fixture_keys(item: nodes.Item, scope: Scope) -> Iterator[_Key]:
252252
# a scope, it overrides that of the fixture.
253253
if (
254254
is_parametrized
255-
and cast(Function, item).callspec._arg2scope[argname] == scope
255+
and cast("Function", item).callspec._arg2scope[argname] == scope
256256
) or (not is_parametrized and fixturedef._scope == scope):
257257
param_index = None
258258
if is_parametrized:
259-
param_index = cast(Function, item).callspec.indices[argname]
259+
param_index = cast("Function", item).callspec.indices[argname]
260260

261261
if scope is Scope.Session:
262262
key: _Key = (argname, param_index)

0 commit comments

Comments
 (0)