MCPcopy Create free account
hub / github.com/pytest-dev/pytest / sort_by_scope

Method sort_by_scope

src/_pytest/fixtures.py:1541–1547  ·  view source on GitHub ↗
(arg_name: str)

Source from the content-addressed store, hash-verified

1539 merge(fixturedefs[-1].argnames)
1540
1541 def sort_by_scope(arg_name: str) -> Scope:
1542 try:
1543 fixturedefs = arg2fixturedefs[arg_name]
1544 except KeyError:
1545 return Scope.Function
1546 else:
1547 return fixturedefs[-1]._scope
1548
1549 fixturenames_closure.sort(key=sort_by_scope, reverse=True)
1550 return initialnames, fixturenames_closure, arg2fixturedefs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected