Skip to content

Commit 01b5db5

Browse files
Fix a bug
1 parent 768f47f commit 01b5db5

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
@@ -259,11 +259,11 @@ def get_fixture_keys(item: nodes.Item, scope: Scope) -> Iterator[_Key]:
259259
# a scope, it overrides that of the fixture.
260260
if (
261261
is_parametrized
262-
and cast(Function, item).callspec._arg2scope[argname] == scope
262+
and cast("Function", item).callspec._arg2scope[argname] == scope
263263
) or (not is_parametrized and fixturedef._scope == scope):
264264
param_index = None
265265
if is_parametrized:
266-
param_index = cast(Function, item).callspec.indices[argname]
266+
param_index = cast("Function", item).callspec.indices[argname]
267267

268268
if scope is Scope.Session:
269269
key: _Key = (argname, param_index)

0 commit comments

Comments
 (0)