Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytest-dev/pytest
/ assert_never
Function
assert_never
src/_pytest/compat.py:416–417 ·
view source on GitHub ↗
(value: "NoReturn")
Source
from the content-addressed store, hash-verified
414
#
415
# This also work for Enums (if you use `is` to compare) and Literals.
416
def
assert_never(value:
"NoReturn"
) ->
"NoReturn"
:
417
assert False, f
"Unhandled value: {value} ({type(value).__name__})"
Callers
7
import_path
Function · 0.90
setmulti
Method · 0.90
get_scope_node
Function · 0.90
get_parametrized_fixture_keys
Function · 0.90
test_assert_never_union
Function · 0.90
test_assert_never_enum
Function · 0.90
test_assert_never_literal
Function · 0.90
Calls
no outgoing calls
Tested by
3
test_assert_never_union
Function · 0.72
test_assert_never_enum
Function · 0.72
test_assert_never_literal
Function · 0.72