'Test unification of `none` and multiple number types to optional type'

def test_none_to_optional(self):

    ctx = typing.Context()
    for tys in itertools.combinations(types.number_domain, 2):
        tys = list(tys)
        expected = types.Optional(ctx.unify_types(*tys))
        results = [ctx.unify_types(*comb) for comb in itertools.permutations((tys + [types.none]))]
        for res in results:
            self.assertEqual(res, expected)
