MCPcopy
hub / github.com/nonebot/nonebot2 / test_unset

Function test_unset

tests/test_utils.py:25–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24
25def test_unset():
26 assert isinstance(UNSET, Unset)
27 assert bool(UNSET) is False
28 assert copy.copy(UNSET) is UNSET
29 assert copy.deepcopy(UNSET) is UNSET
30 assert pickle.loads(pickle.dumps(UNSET)) is UNSET
31 assert type_validate_python(UnsetType, UNSET) is UNSET
32
33 with pytest.raises(ValidationError):
34 type_validate_python(UnsetType, 123)
35
36
37def test_exclude_unset():

Callers

nothing calls this directly

Calls 2

type_validate_pythonFunction · 0.90
copyMethod · 0.45

Tested by

no test coverage detected