MCPcopy Create free account
hub / github.com/LLMQuant/quant-mind / StripOptionalTests

Class StripOptionalTests

tests/test_magic.py:25–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 _pydantic_schema_str,
24 _strip_optional,
25 preview_resolve,
26 resolve_magic_input,
27)
28
29
30class StripOptionalTests(unittest.TestCase):
31 def test_optional_t(self) -> None:
32 self.assertIs(_strip_optional(Optional[int]), int)
33
34 def test_pep604_union_with_none(self) -> None:
35 self.assertIs(_strip_optional(int | None), int)
36
37 def test_plain_t_unchanged(self) -> None:
38 self.assertIs(_strip_optional(int), int)
39
40 def test_union_without_none_unchanged(self) -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected