当前位置: 首页>>代码示例>>Python>>正文


Python testTemplate.regexTester函数代码示例

本文整理汇总了Python中testTemplate.regexTester函数的典型用法代码示例。如果您正苦于以下问题:Python regexTester函数的具体用法?Python regexTester怎么用?Python regexTester使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了regexTester函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1")
	testcase = testTemplate.regexTester("apple\npepperoni" , "2" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample Test Suite2")
	testcase = testTemplate.regexTester("lover\ndriver" , "1" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample Test Suite3")
	testcase = testTemplate.regexTester("bidhan\nroy" , "-1" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample Test Suite4")
	testcase = testTemplate.regexTester("testsetses\nteeptes" , "3" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Test#11")
	testcase = testTemplate.regexTester("aaaaaaaaaaaaaaaaaaaaaaa\nbbbbbbbbbaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbb" , "-1" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:29,代码来源:testCases.py

示例2: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1",print_count=True)
	testcase = testTemplate.regexTester("1" , "1" , "sample1")
	suite.add(testcase)
	testcase = testTemplate.regexTester("2" , "5" , "sample2")
	suite.add(testcase)
	testcase = testTemplate.regexTester("3" , "13" , "sample3")
	suite.add(testcase)
	testcase = testTemplate.regexTester("4" , "27" , "sample4")
	suite.add(testcase)
	testcase = testTemplate.regexTester("5" , "48" , "sample5")
	suite.add(testcase)
	testcase = testTemplate.regexTester("6" , "78" , "sample6")
	suite.add(testcase)
	testcase = testTemplate.regexTester("7" , "118" , "sample7")
	suite.add(testcase)
	testcase = testTemplate.regexTester("8" , "170" , "sample8")
	suite.add(testcase)
	testcase = testTemplate.regexTester("9" , "235" , "sample9")
	suite.add(testcase)
	testcase = testTemplate.regexTester("10" , "315" , "sample10")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:27,代码来源:testCases.py

示例3: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1")
	testcase = testTemplate.regexTester("long_and_mnemonic_identifier" , "longAndMnemonicIdentifier" , "sample1")
	suite.add(testcase)
	testcase = testTemplate.regexTester("anotherExample" , "another_example" , "sample2")
	suite.add(testcase)
	testcase = testTemplate.regexTester("i" , "i" , "sample3")
	suite.add(testcase)
	testcase = testTemplate.regexTester("bad_Style" , "Error!" , "sample4")
	suite.add(testcase)
	testcase = testTemplate.regexTester("i_" , "Error!" , "sample5")
	suite.add(testcase)
	testcase = testTemplate.regexTester("n_e_e_r_c" , "nEERC" , "sample6")
	suite.add(testcase)
	testcase = testTemplate.regexTester("nEERC" , "n_e_e_r_c" , "sample7")
	suite.add(testcase)
	testcase = testTemplate.regexTester("longAndMnemonicIdentifier" , "long_and_mnemonic_identifier" , "sample8")
	suite.add(testcase)
	testcase = testTemplate.regexTester("c_identifier" , "cIdentifier" , "sample9")
	suite.add(testcase)
	testcase = testTemplate.regexTester("javaIdentifier" , "java_identifier" , "sample10")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:27,代码来源:testCases.py

示例4: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1")
	testcase = testTemplate.regexTester('''10
1
1''' , "2" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample Test Suite2")
	testcase = testTemplate.regexTester('''5
2
2 3''' , "4" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	suite=testTemplate.testSuite("Sample Test Suite3")
	testcase = testTemplate.regexTester('''19
2
4 5''' , "8" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:25,代码来源:testCases.py

示例5: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1",print_count=True)
	testcase = testTemplate.regexTester("CCCCC" , "5" , "sample1")
	suite.add(testcase)
	testcase = testTemplate.regexTester("ABABA" , "9" , "sample2")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:11,代码来源:testCases.py

示例6: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1",footer="0")
	testcase = testTemplate.regexTester("7 2 1 4 5 1 3 3" , "8" , "sample1")
	suite.add(testcase)
	testcase = testTemplate.regexTester("4 1000 1000 1000 1000" , "4000" , "sample2")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:11,代码来源:testCases.py

示例7: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1")
	testcase = testTemplate.regexTester("5\n999 1 1 1 0" , "1001" , "sample1")
	suite.add(testcase)
	testcase = testTemplate.regexTester("5\n0 1 1 1 999" , "999" , "sample2")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:11,代码来源:testCases.py

示例8: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1")
	testcase = testTemplate.regexTester("8 1\n0 0\n3 1\n5 0\n4 2\n3 4\n2 5\n1 5\n0 5" , "" , "sample")
	suite.add(testcase)
	testcase = testTemplate.regexTester("8 1\n0 5\n20 20\n23 11\n5 0\n4 2\n3 4\n2 5\n1 5" , "" , "sample")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:11,代码来源:testCases.py

示例9: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1" , footer="0")
	testcase = testTemplate.regexTester("5\ntoioynnkpheleaigshareconhtomesnlewx" , "theresnoplacelikehomeonasnowynightx" , "sample1")
	suite.add(testcase)
	testcase = testTemplate.regexTester("3\nttyohhieneesiaabss" , "thisistheeasyoneab" , "sample2")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:11,代码来源:testCases.py

示例10: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1" , print_count = True)
	testcase = testTemplate.regexTester("a c 3 a b c" , "2" , "sample1")
	#suite.add(testcase)
	arr = ["hot","cog","dog","tot","hog","hop","pot","dot"]
	testcase = testTemplate.regexTester("hot dog "+str(len(arr))+(" ".join(arr)) , "5" , "sample2")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:12,代码来源:testCases.py

示例11: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1",print_count=True)
	testcase = testTemplate.regexTester("2\n1 1\n3 2" , "5" , "sample1")
	suite.add(testcase)
	testcase = testTemplate.regexTester("3\n2 3 2\n1 3 2" , "15" , "sample2")
	suite.add(testcase)
	tests.append(suite)
	
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:12,代码来源:testCases.py

示例12: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1",print_count=True)
	testcase = testTemplate.regexTester("2 acmmcacamapapc mca pa" , "6" , "sample1")
	suite.add(testcase)
	testcase = testTemplate.regexTester("1 ccdedefcde cde" , "1" , "sample2")
	suite.add(testcase)
	testcase = testTemplate.regexTester("2 aabaab aa bb" , "0" , "sample3")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:13,代码来源:testCases.py

示例13: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1")
	testcase = testTemplate.regexTester("<<>>" , "4" , "sample1")
	suite.add(testcase)
	testcase = testTemplate.regexTester("><" , "0" , "sample2")
	suite.add(testcase)
	testcase = testTemplate.regexTester("<>>>" , "2" , "sample3")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:13,代码来源:testCases.py

示例14: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1" , print_count=True)
	testcase = testTemplate.regexTester("100" , "0" , "sample1")
	suite.add(testcase)
	testcase = testTemplate.regexTester("110" , "1" , "sample2")
	suite.add(testcase)
	testcase = testTemplate.regexTester("226" , "3" , "sample3")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:13,代码来源:testCases.py

示例15: getTests

def getTests():
	tests = []
	
	suite=testTemplate.testSuite("Sample Test Suite1",print_count=True,header="\n")
	testcase = testTemplate.regexTester("a aa bb cc def ghi" , "3" , "sample1")
	suite.add(testcase)
	testcase = testTemplate.regexTester("a a a a a bb bb bb bb c c" , "5" , "sample2")
	suite.add(testcase)
	testcase = testTemplate.regexTester("  \na a a a a" , "5" , "sample4")
	suite.add(testcase)
	tests.append(suite)
	
	return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:13,代码来源:testCases.py


注:本文中的testTemplate.regexTester函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。