96def test_get_common_py_type():
97 __test_get_common_py_type("ascalar", 1, 0, 1, 1, int)
98 __test_get_common_py_type("aset", {-1, 2, 3}, 1, 1, 3, int)
99 __test_get_common_py_type("alist", [1.0, 2.0, 3.0], 1, 0, 0, float)
100 __test_get_common_py_type("atuple", (-1, 2, 3), 1, 1, 3, int)
101
102 __test_get_common_py_type("aset2", {frozenset([-1, 2, 3]),frozenset([-3,4,5])},
103 2, 1, 5, int)
104 __test_get_common_py_type("alist2", [[1, 2, 3],[6,7]], 2, 1, 7, int)
105 __test_get_common_py_type("atuple2", [(-1, 2, 3),[8,-9]], 2, -9, 8, int)
106
107 __test_get_common_py_type("badset", {1, 2, 3.0}, 1, 1, 3, int)
108 __test_get_common_py_type("badlist", [1, 2, 3.0], 1, 1, 3, int)
109 __test_get_common_py_type("badtuple", (1, 2, 3.0), 1, 1, 3, int)
110
111 __test_get_common_py_type("badset2", {frozenset([-1, 2, 3]),frozenset([-3,4,5.0])},
112 2, 1, 5, int)
113 __test_get_common_py_type("badlist2", [[1, 2, 3],[6,7.0]], 2, 1, 7, int)
114 __test_get_common_py_type("badtuple2", [(-1, 2, 3),[8,-9.0]], 2, -9, 8, int)
115