D | test_descr.py | 83 def binop_test(self, a, b, res, expr="a+b", meth="__add__"): member in OperatorsTest 172 self.binop_test([1], [2], [1,2], "a+b", "__add__") 173 self.binop_test([1,2,3], 2, 1, "b in a", "__contains__") 174 self.binop_test([1,2,3], 4, 0, "b in a", "__contains__") 175 self.binop_test([1,2,3], 1, 2, "a[b]", "__getitem__") 180 self.binop_test([1,2], 3, [1,2,1,2,1,2], "a*b", "__mul__") 181 self.binop_test([1,2], 3, [1,2,1,2,1,2], "b*a", "__rmul__") 188 self.binop_test({1:2,3:4}, 1, 1, "b in a", "__contains__") 189 self.binop_test({1:2,3:4}, 2, 0, "b in a", "__contains__") 190 self.binop_test({1:2,3:4}, 1, 2, "a[b]", "__getitem__") [all …]
|