def __init__(self): self.collection = testdata.merge_lists( [None], testdata.list_bool, testdata.list_int, testdata.list_float, testdata.list_long[:-1], # the last number is very long testdata.list_complex, testdata.list_myint, testdata.list_myfloat, testdata.list_mylong, testdata.list_mycomplex, testdata.get_Int64_Byte(), ) self.collection_oldstyle = [oldstyle(x) for x in self.collection] self.collection_oldstyle_reflect = [oldstyle_reflect(x) for x in self.collection] self.collection_oldstyle_notdefined = [oldstyle_notdefined(x) for x in self.collection] self.collection_newstyle = [newstyle(x) for x in self.collection] self.collection_newstyle_reflect = [newstyle_reflect(x) for x in self.collection] self.collection_newstyle_notdefined = [newstyle_notdefined(x) for x in self.collection] self.collection_oldstyle_inplace = [oldstyle_inplace(x) for x in self.collection] self.collection_newstyle_inplace = [newstyle_inplace(x) for x in self.collection]
def __init__(self): self.collection = testdata.merge_lists( [None], testdata.list_bool, testdata.list_int, testdata.list_float, testdata.list_long[:-1], # the last number is very long testdata.list_complex, testdata.list_myint, testdata.list_myfloat, testdata.list_mylong, testdata.list_mycomplex, testdata.get_Int64_Byte(), ) self.collection_oldstyle = [oldstyle(x) for x in self.collection] self.collection_oldstyle_reflect = [oldstyle_reflect(x) for x in self.collection] self.collection_oldstyle_notdefined = [oldstyle_notdefined(x) for x in self.collection] self.collection_newstyle = [newstyle(x) for x in self.collection] self.collection_newstyle_reflect = [newstyle_reflect(x) for x in self.collection] self.collection_newstyle_notdefined = [newstyle_notdefined(x) for x in self.collection] self.collection_oldstyle_inplace = [oldstyle_inplace(x) for x in self.collection] self.collection_newstyle_inplace = [newstyle_inplace(x) for x in self.collection]
def __init__(self): self.data = testdata.merge_lists( [None], testdata.list_set, testdata.list_frozenset, )
def __init__(self): self.data = testdata.merge_lists(testdata.list_dict)
def __init__(self): self.data = testdata.merge_lists(testdata.list_complex, testdata.list_mycomplex)
def __init__(self): self.data = testdata.merge_lists(testdata.list_str, testdata.list_mystr)
def __init__(self): self.collection = testdata.merge_lists(testdata.get_enums(), testdata.list_bool, testdata.list_int) self.collection_oldstyle = [oldstyle(x) for x in self.collection] self.collection_newstyle = [newstyle(x) for x in self.collection]
class newstyle(object): def __init__(self, value): self.value = value def __cmp__(self, other): return cmp(self.value, other) def __repr__(self): return "newstyle(%s)" % str(self.value) import sys collection = testdata.merge_lists( [None], testdata.list_int, testdata.list_float, testdata.list_long, testdata.list_bool, testdata.list_myint, testdata.list_myfloat, testdata.list_mylong, ) collection_oldstyle = [oldstyle(x) for x in collection] collection_newstyle = [newstyle(x) for x in collection] class common(object): def true_compare(self, leftc, rightc, oplist = ["<", ">", ">=", "<=", "==", "<>" ]): for a in leftc: for b in rightc: if '<' in oplist: try:
from __future__ import division # not all are testing true division import sys from common import * import testdata collection = testdata.merge_lists( [None], testdata.list_int, testdata.list_float, testdata.list_bool, testdata.list_long, testdata.list_complex, testdata.list_myint, testdata.list_myfloat, testdata.list_mylong, testdata.list_mycomplex, ) class oldstyle: def __init__(self, value): self.value = value def __truediv__(self, other): return self.value / other def __rtruediv__(self, other): return other / self.value def __itruediv__(self, other):
def __init__(self): self.data = testdata.merge_lists( [None], testdata.list_set, testdata.list_frozenset, )
def __init__(self): self.data = testdata.merge_lists(testdata.list_dict)
def __init__(self): self.data = testdata.merge_lists(testdata.list_complex, testdata.list_mycomplex)
def __init__(self): self.data = testdata.merge_lists(testdata.list_str, testdata.list_mystr)
def __init__(self): self.collection = testdata.merge_lists(testdata.get_enums(), testdata.list_bool, testdata.list_int) self.collection_oldstyle = [oldstyle(x) for x in self.collection] self.collection_newstyle = [newstyle(x) for x in self.collection]