def make_tests(suite_name): builder = TestBuilder(suite_name) builder.addTest("containerRecognition", EMPTY_CONTAINERS) builder.addTest("numericTypes", NUMERIC_TYPES) builder.addTest("stringTypes", STRING_TYPES) builder.addTest("typeTests", TYPES_TESTS) builder.addTest("miscTypes", MISC_TYPES) builder.addModularTest("module", MODULE_TEST,[TestModule("bar","")])
def make_tests(suite_name): builder = TestBuilder(suite_name) ind = 0 for test in DECORATOR_TESTS: builder.addTest("decorator"+str(ind), DECORATOR_TEST_HEAD + test); ind += 1 ind = 0 for test in TESTS: builder.addTest("classMethodBuiltinDecorators"+str(ind), CLASS_METHOD_DECORATOR_TESTS + test) ind += 1 builder.addTest("propertyTest", PROPERTY_TEST)
def make_test(suite_name): builder = TestBuilder(suite_name) builder.addTest("contextManager", TEST)
def make_tests(suite_name): builder = TestBuilder(suite_name) ops = ['a+b', 'a-b', 'a*b', 'a/b', 'a&b', 'a^b', 'a%b', '-a+b', 'int(a)', 'str(int(a))', 'long(a)', 'float(a)'] builder.addTest("intTest", gen(2, 3, ops)) builder.addTest("intTest2", gen(100, 5, ops)) builder.addTest("longTest", gen(2, 3L, ops)) builder.addTest("longTest2", gen(100, 5L, ops)) builder.addTest("floatTest", gen(2.1, 3.2, ops)) builder.addTest("floatTest2", gen(100.87, 5, ops)) builder.addTest("floatTest3", gen(5536L, 1e7+1e3+1e-2, ops)) builder.addTest("boolTest", gen(True, False, ops)) builder.addTest("boolTest2", gen(False, True, ops)) builder.addTest("boolTest3", gen(True, 5, ops)) builder.addTest("boolTest4", gen(5j, True, ops)) ops = ['a+b', 'a-b', 'a*b', 'a/b', 'a&b', 'a^b', 'a%b', '-a+b', 'int(a)', 'str(int(a))', 'chr(35)'] builder.addTest("strTest", gen('sadfv', 3, ops)) builder.addTest("strTest2", gen('asdf', 'yoklmn', ops)) ops = ['a+b', 'a-b', 'a*b', 'a/b', 'a&b', 'a^b', 'a%b', '-a+b', 'int(a)', 'unichr(1049)'] builder.addTest("uniTest", gen(u'sadfv', 3, ops)) builder.addTest("uniTest2", gen(u'vdf', u'hf', ops)) builder.addTest("uniTest3", gen('asdf', u'yoprst', ops))
def make_tests(suite_name): builder = TestBuilder(suite_name) for meth, func in METHS_TO_FUNCS.items(): script = SCRIPT % {'meth':meth, 'val':METHS_TO_VALS[meth], 'func':func} builder.addTest(meth,script)
def make_tests(suite_name): builder = TestBuilder(suite_name) ind = 0 for test in TESTS: builder.addTest("paramPass"+str(ind), test) ind += 1
def make_tests(suite_name): builder = TestBuilder(suite_name) script_parameters = {"all_args":"self","args":"","ret":"0", "check":"0"} builder.addTest("NoArgs",SCRIPT % script_parameters) script_parameters = {"all_args":"self, arg0, arg1","args":"1, 2","ret":"arg0", "check":"1"} builder.addTest("WithArgs",SCRIPT % script_parameters)
def make_test(suite_name): builder = TestBuilder(suite_name) builder.addTest("simpleTest",TEST);
def make_test(suite_name): builder = TestBuilder(suite_name) builder.addTest("descriptorTest", TEST)
def make_tests(suite_name): builder = TestBuilder(suite_name) builder.addTest("allMethodsIncluded", CONTAINER_TYPE + TESTS) builder.addTest("iterationTest", CONTAINER_TYPE + ITERATION_TESTS)
def make_test(suite_name): builder = TestBuilder(suite_name) for name, test in TESTS.items(): builder.addTest(name,test)
def gen_tests(suite_name, operators, test_str, klass): builder = TestBuilder(suite_name) for oper, symname in operators.items(): script_content = value_klass + klass % oper + test_str % symname builder.addTest(oper, script_content)
def make_tests(suite_name): builder = TestBuilder(suite_name) builder.addTest("simpleLambdaCalc", SIMPLE_LAMBDA_CALC) builder.addTest("lamdaFlowsTest", LAMBDA_FLOWS_TEST) builder.addTest("parametrizedLambdaFlows", COMPLEX_LAMBDA_TEST)
def make_test(suite_name): builder = TestBuilder(suite_name) builder.addTest("explicitMROTest", TEST_HEAD + EXPLICIT_TEST) builder.addTest("mroAttrTest", TEST_HEAD + MRO_ATTR_TEST)
def make_test(suite_name): builder = TestBuilder(suite_name); for name, content in TESTS.items(): builder.addTest(name,content)
def make_tests(suite_name): builder = TestBuilder(suite_name) builder.addTest("attrAccsessNewStyle", NEW_STYLE_CLASS + TESTS) builder.addTest("attrAccessOldStyle", OLD_STYLE_CLASS + TESTS) builder.addTest("simpleGetattributeTest", SIMPLE_GETATTRIBUTE_TEST) builder.addTest("complexGetattributeTest", COMPLEX_GETATTRIBUTE_TEST)