Home
last modified time | relevance | path

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

/external/python/cpython2/Lib/test/
Dtest_descr.py86 def binop_test(self, a, b, res, expr="a+b", meth="__add__"): member in OperatorsTest
181 self.binop_test([1], [2], [1,2], "a+b", "__add__")
182 self.binop_test([1,2,3], 2, 1, "b in a", "__contains__")
183 self.binop_test([1,2,3], 4, 0, "b in a", "__contains__")
184 self.binop_test([1,2,3], 1, 2, "a[b]", "__getitem__")
189 self.binop_test([1,2], 3, [1,2,1,2,1,2], "a*b", "__mul__")
190 self.binop_test([1,2], 3, [1,2,1,2,1,2], "b*a", "__rmul__")
198 self.binop_test({1:2}, {2:1}, -1, "cmp(a,b)", "__cmp__")
200 self.binop_test({1:2}, {2:1}, True, "a < b", "__lt__")
201 self.binop_test({1:2,3:4}, 1, 1, "b in a", "__contains__")
[all …]
/external/python/cpython3/Lib/test/
Dtest_descr.py83 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 …]