Lines Matching refs:testme
148 testme = AllTests()
152 testme + 1
153 self.assertCallStack([("__coerce__", (testme, 1)), ("__add__", (testme, 1))])
156 1 + testme
157 self.assertCallStack([("__coerce__", (testme, 1)), ("__radd__", (testme, 1))])
160 testme - 1
161 self.assertCallStack([("__coerce__", (testme, 1)), ("__sub__", (testme, 1))])
164 1 - testme
165 self.assertCallStack([("__coerce__", (testme, 1)), ("__rsub__", (testme, 1))])
168 testme * 1
169 self.assertCallStack([("__coerce__", (testme, 1)), ("__mul__", (testme, 1))])
172 1 * testme
173 self.assertCallStack([("__coerce__", (testme, 1)), ("__rmul__", (testme, 1))])
177 testme / 1
178 self.assertCallStack([("__coerce__", (testme, 1)), ("__div__", (testme, 1))])
182 1 / testme
183 self.assertCallStack([("__coerce__", (testme, 1)), ("__rdiv__", (testme, 1))])
186 testme % 1
187 self.assertCallStack([("__coerce__", (testme, 1)), ("__mod__", (testme, 1))])
190 1 % testme
191 self.assertCallStack([("__coerce__", (testme, 1)), ("__rmod__", (testme, 1))])
195 divmod(testme,1)
196 self.assertCallStack([("__coerce__", (testme, 1)), ("__divmod__", (testme, 1))])
199 divmod(1, testme)
200 self.assertCallStack([("__coerce__", (testme, 1)), ("__rdivmod__", (testme, 1))])
203 testme ** 1
204 self.assertCallStack([("__coerce__", (testme, 1)), ("__pow__", (testme, 1))])
207 1 ** testme
208 self.assertCallStack([("__coerce__", (testme, 1)), ("__rpow__", (testme, 1))])
211 testme >> 1
212 self.assertCallStack([("__coerce__", (testme, 1)), ("__rshift__", (testme, 1))])
215 1 >> testme
216 self.assertCallStack([("__coerce__", (testme, 1)), ("__rrshift__", (testme, 1))])
219 testme << 1
220 self.assertCallStack([("__coerce__", (testme, 1)), ("__lshift__", (testme, 1))])
223 1 << testme
224 self.assertCallStack([("__coerce__", (testme, 1)), ("__rlshift__", (testme, 1))])
227 testme & 1
228 self.assertCallStack([("__coerce__", (testme, 1)), ("__and__", (testme, 1))])
231 1 & testme
232 self.assertCallStack([("__coerce__", (testme, 1)), ("__rand__", (testme, 1))])
235 testme | 1
236 self.assertCallStack([("__coerce__", (testme, 1)), ("__or__", (testme, 1))])
239 1 | testme
240 self.assertCallStack([("__coerce__", (testme, 1)), ("__ror__", (testme, 1))])
243 testme ^ 1
244 self.assertCallStack([("__coerce__", (testme, 1)), ("__xor__", (testme, 1))])
247 1 ^ testme
248 self.assertCallStack([("__coerce__", (testme, 1)), ("__rxor__", (testme, 1))])
251 testme = AllTests()
264 1 in testme
265 self.assertCallStack([('__contains__', (testme, 1))])
268 testme[1]
269 self.assertCallStack([('__getitem__', (testme, 1))])
272 testme[1] = 1
273 self.assertCallStack([('__setitem__', (testme, 1, 1))])
276 del testme[1]
277 self.assertCallStack([('__delitem__', (testme, 1))])
280 testme[:42]
281 self.assertCallStack([('__getslice__', (testme, 0, 42))])
284 testme[:42] = "The Answer"
285 self.assertCallStack([('__setslice__', (testme, 0, 42, "The Answer"))])
288 del testme[:42]
289 self.assertCallStack([('__delslice__', (testme, 0, 42))])
292 testme[2:1024:10]
293 self.assertCallStack([('__getitem__', (testme, slice(2, 1024, 10)))])
296 testme[2:1024:10] = "A lot"
297 self.assertCallStack([('__setitem__', (testme, slice(2, 1024, 10),
300 del testme[2:1024:10]
301 self.assertCallStack([('__delitem__', (testme, slice(2, 1024, 10)))])
304 testme[:42, ..., :24:, 24, 100]
305 self.assertCallStack([('__getitem__', (testme, (slice(None, 42, None),
310 testme[:42, ..., :24:, 24, 100] = "Strange"
311 self.assertCallStack([('__setitem__', (testme, (slice(None, 42, None),
316 del testme[:42, ..., :24:, 24, 100]
317 self.assertCallStack([('__delitem__', (testme, (slice(None, 42, None),
336 testme[:42]
337 self.assertCallStack([('__getitem__', (testme, slice(0, 42, None)))])
340 testme[:42] = "The Answer"
341 self.assertCallStack([('__setitem__', (testme, slice(0, 42, None),
344 del testme[:42]
345 self.assertCallStack([('__delitem__', (testme, slice(0, 42, None)))])
367 testme = AllTests()
370 -testme
371 self.assertCallStack([('__neg__', (testme,))])
373 +testme
374 self.assertCallStack([('__pos__', (testme,))])
376 abs(testme)
377 self.assertCallStack([('__abs__', (testme,))])
379 int(testme)
380 self.assertCallStack([('__int__', (testme,))])
382 long(testme)
383 self.assertCallStack([('__long__', (testme,))])
385 float(testme)
386 self.assertCallStack([('__float__', (testme,))])
388 oct(testme)
389 self.assertCallStack([('__oct__', (testme,))])
391 hex(testme)
392 self.assertCallStack([('__hex__', (testme,))])
396 testme = AllTests()
399 hash(testme)
400 self.assertCallStack([('__hash__', (testme,))])
403 repr(testme)
404 self.assertCallStack([('__repr__', (testme,))])
407 str(testme)
408 self.assertCallStack([('__str__', (testme,))])
411 testme == 1
412 self.assertCallStack([("__coerce__", (testme, 1)), ('__cmp__', (testme, 1))])
415 testme < 1
416 self.assertCallStack([("__coerce__", (testme, 1)), ('__cmp__', (testme, 1))])
419 testme > 1
420 self.assertCallStack([("__coerce__", (testme, 1)), ('__cmp__', (testme, 1))])
424 self.assertCallStack([("__coerce__", (testme, 1)), ('__cmp__', (testme, 1))])
427 testme != 1
428 self.assertCallStack([("__coerce__", (testme, 1)), ('__cmp__', (testme, 1))])
431 1 == testme
432 self.assertCallStack([("__coerce__", (testme, 1)), ('__cmp__', (1, testme))])
435 1 < testme
436 self.assertCallStack([("__coerce__", (testme, 1)), ('__cmp__', (1, testme))])
439 1 > testme
440 self.assertCallStack([("__coerce__", (testme, 1)), ('__cmp__', (1, testme))])
444 self.assertCallStack([("__coerce__", (testme, 1)), ('__cmp__', (1, testme))])
447 1 != testme
448 self.assertCallStack([("__coerce__", (testme, 1)), ('__cmp__', (1, testme))])
466 testme = ExtraTests()
469 testme.spam
470 self.assertCallStack([('__getattr__', (testme, "spam"))])
473 testme.eggs = "spam, spam, spam and ham"
474 self.assertCallStack([('__setattr__', (testme, "eggs",
478 del testme.cardinal
479 self.assertCallStack([('__delattr__', (testme, "cardinal"))])
487 testme = DelTest()
488 del testme