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

Method test_none

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

Source from the content-addressed store, hash-verified

765 self.assert_join(self.fx.t, self.fx.s, self.fx.o)
766
767 def test_none(self) -> None:
768 with state.strict_optional_set(False):
769 # Any type t joined with None results in t.
770 for t in [
771 NoneType(),
772 self.fx.a,
773 self.fx.o,
774 UnboundType("x"),
775 self.fx.t,
776 self.tuple(),
777 self.callable(self.fx.a, self.fx.b),
778 self.fx.anyt,
779 ]:
780 self.assert_join(t, NoneType(), t)
781
782 def test_unbound_type(self) -> None:
783 self.assert_join(UnboundType("x"), UnboundType("x"), self.fx.anyt)

Callers

nothing calls this directly

Calls 6

tupleMethod · 0.95
callableMethod · 0.95
assert_joinMethod · 0.95
NoneTypeClass · 0.90
UnboundTypeClass · 0.90
strict_optional_setMethod · 0.80

Tested by

no test coverage detected