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

Method next_higher

src/_pytest/scope.py:49–54  ·  view source on GitHub ↗

Return the next higher scope.

(self)

Source from the content-addressed store, hash-verified

47 return _ALL_SCOPES[index - 1]
48
49 def next_higher(self) -> "Scope":
50 """Return the next higher scope."""
51 index = _SCOPE_INDICES[self]
52 if index == len(_SCOPE_INDICES) - 1:
53 raise ValueError(f"{self} is the upper-most scope")
54 return _ALL_SCOPES[index + 1]
55
56 def __lt__(self, other: "Scope") -> bool:
57 self_index = _SCOPE_INDICES[self]

Callers 1

test_next_higherFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_next_higherFunction · 0.64