MCPcopy Index your code
hub / github.com/python/mypy / test_optional

Method test_optional

mypy/test/testtypes.py:1444–1446  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1442 self.fx = TypeFixture()
1443
1444 def test_optional(self) -> None:
1445 t = UnionType.make_union([self.fx.a, self.fx.nonet])
1446 self.assert_union_result(t, [self.fx.a, self.fx.nonet])
1447
1448 def test_two_instances(self) -> None:
1449 t = UnionType.make_union([self.fx.a, self.fx.b])

Callers

nothing calls this directly

Calls 2

assert_union_resultMethod · 0.95
make_unionMethod · 0.80

Tested by

no test coverage detected