def test_basic_ignored(self): foo = UniversalObjectType({ "bar": StringType() }) foo = prepare_lhs_type(foo, UniversalObjectType({ "bar": IntegerType() })) self.assertIsInstance(foo.get_micro_op_type(("get", "bar")).value_type, StringType)
def test_composite_types_inferred(self): foo = UniversalObjectType({ "bar": InferredType() }) foo = prepare_lhs_type(foo, UniversalObjectType({ "bar": UniversalObjectType({ "bam": IntegerType() }) })) self.assertIsInstance(foo.get_micro_op_type(("get", "bar")).value_type.get_micro_op_type(("get", "bam")).value_type, IntegerType)