Fix a bug
This commit is contained in:
parent
768f47f376
commit
01b5db543a
|
@ -259,11 +259,11 @@ def get_fixture_keys(item: nodes.Item, scope: Scope) -> Iterator[_Key]:
|
||||||
# a scope, it overrides that of the fixture.
|
# a scope, it overrides that of the fixture.
|
||||||
if (
|
if (
|
||||||
is_parametrized
|
is_parametrized
|
||||||
and cast(Function, item).callspec._arg2scope[argname] == scope
|
and cast("Function", item).callspec._arg2scope[argname] == scope
|
||||||
) or (not is_parametrized and fixturedef._scope == scope):
|
) or (not is_parametrized and fixturedef._scope == scope):
|
||||||
param_index = None
|
param_index = None
|
||||||
if is_parametrized:
|
if is_parametrized:
|
||||||
param_index = cast(Function, item).callspec.indices[argname]
|
param_index = cast("Function", item).callspec.indices[argname]
|
||||||
|
|
||||||
if scope is Scope.Session:
|
if scope is Scope.Session:
|
||||||
key: _Key = (argname, param_index)
|
key: _Key = (argname, param_index)
|
||||||
|
|
Loading…
Reference in New Issue