Home
last modified time | relevance | path

Searched refs:binop_test (Results 1 – 1 of 1) sorted by relevance

/external/python/cpython2/Lib/test/
Dtest_descr.py79 def binop_test(self, a, b, res, expr="a+b", meth="__add__"): member in OperatorsTest
174 self.binop_test([1], [2], [1,2], "a+b", "__add__")
175 self.binop_test([1,2,3], 2, 1, "b in a", "__contains__")
176 self.binop_test([1,2,3], 4, 0, "b in a", "__contains__")
177 self.binop_test([1,2,3], 1, 2, "a[b]", "__getitem__")
182 self.binop_test([1,2], 3, [1,2,1,2,1,2], "a*b", "__mul__")
183 self.binop_test([1,2], 3, [1,2,1,2,1,2], "b*a", "__rmul__")
191 self.binop_test({1:2}, {2:1}, -1, "cmp(a,b)", "__cmp__")
193 self.binop_test({1:2}, {2:1}, True, "a < b", "__lt__")
194 self.binop_test({1:2,3:4}, 1, 1, "b in a", "__contains__")
[all …]