本文整理汇总了Python中testTemplate.testInstance函数的典型用法代码示例。如果您正苦于以下问题:Python testInstance函数的具体用法?Python testInstance怎么用?Python testInstance使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了testInstance函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1",print_count=True)
testcase = testTemplate.testInstance(
'''
8
1 2 3 4 5 6 7 8
2 2
''' , "1 2 5 6 " , "sample1")
suite.add(testcase)
testcase = testTemplate.testInstance(
'''
10
1 2 3 4 5 6 7 8 9 10
3 2
''' , "1 2 3 6 7 8 " , "sample2")
suite.add(testcase)
testcase = testTemplate.testInstance(
'''
10
1 2 3 4 5 6 7 8 9 10
1 1
''' , "1 3 5 7 9 " , "sample3")
suite.add(testcase)
tests.append(suite)
return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:28,代码来源:testCases.py
示例2: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1")
testcase = testTemplate.testInstance('''
5
0 1 0 1 0''' , "3" , "sample")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite2")
testcase = testTemplate.testInstance('''
5
1 1 0 0 1''' , "4" , "sample")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite3")
testcase = testTemplate.testInstance('''
2
0 0''' , "0" , "sample")
suite.add(testcase)
tests.append(suite)
return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:25,代码来源:testCases.py
示例3: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1")
testcase = testTemplate.testInstance("3\n3 1 5" , "26" , "sample")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite2")
testcase = testTemplate.testInstance("1\n10" , "10" , "sample")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Custom Test Suite1")
testcase = testTemplate.testInstance("4\n3 1 5 1" , "30" , "custom")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Custom Test Suite2")
testcase = testTemplate.testInstance("2\n3 1" , "8" , "custom")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Custom Test Suite3")
testcase = testTemplate.testInstance("7\n3 1 2 4 5 6 7" , "111" , "custom")
suite.add(testcase)
tests.append(suite)
return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:29,代码来源:testCases.py
示例4: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite")
testCase = testTemplate.testInstance("3 8" , "0" , "Smoke test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("3 9" , "0" , "Smoke test case 2")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("2 4" , "-1" , "Smoke test case 3")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("5 25" , "5" , "Smoke test case 4")
defaultSuite.add(testCase)
#testCase = testTemplate.testInstance("7\n60 44 33 67 9 90 34" , "6159" , "Smoke test case 5")
#defaultSuite.add(testCase)
#length=random.randint(1,5)
#length=10
#arr=[]
#input=str(length)+"\n"
#for i in range(length):
# temp = random.randint(1,100)
# arr.append(temp)
#for num in arr:
# input=input+str(num)+" "
#output=str(solve(arr))
#output=str(random.randint(1,100))
#temp=random.randint(1,10)
#testCase = testTemplate.testInstance(str(temp), str(temp+1) , "Cross checking from soln")
#defaultSuite.add(testCase)
return defaultSuite
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:31,代码来源:testCases.py
示例5: getTests
def getTests():
tests = []
n=10
suite=testTemplate.testSuite("Sample Test Suite1",header=str(n),footer="e")
for i in range(n):
testcase = testTemplate.testInstance("f "+str(i) , "Set:"+str(i)+" , Rank:1" , "Initialisation Test on "+str(i))
suite.add(testcase)
for i in range(0,n,2):
testcase = testTemplate.testInstance("u "+str(i)+" "+str(i+1)+"\nf "+str(i) , "Set:"+str(i+1)+" , Rank:2" , "First Union Test on "+str(i)+","+str(i+1))
suite.add(testcase)
testcase = testTemplate.testInstance("f "+str(i+1) , "Set:"+str(i+1)+" , Rank:2" , " First Parent Test on "+str(i+1))
suite.add(testcase)
for i in range(0,n-4,4):
testcase = testTemplate.testInstance("u "+str(i)+" "+str(i+3)+"\nf "+str(i) , "Set:"+str(i+3)+" , Rank:3" , "Second Union Test on "+str(i)+","+str(i+1))
suite.add(testcase)
testcase = testTemplate.testInstance("f "+str(i+2) , "Set:"+str(i+3)+" , Rank:3" , "Second Parent Test on "+str(i+1))
suite.add(testcase)
tests.append(suite)
return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:26,代码来源:testCases.py
示例6: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite")
testCase = testTemplate.testInstance("1 5 2" , "1 6" , "Smoke test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("2 20 8" , "2 63426" , "Smoke test case 2")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("3 30 17" , "3 1861225" , "Smoke test case 3")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("4 40 24" , "4 168212501" , "Smoke test case 4")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("5 50 37" , "5 44874764" , "Smoke test case 5")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("6 60 52" , "6 160916" , "Smoke test case 6")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("7 70 59" , "7 22937308" , "Smoke test case 7")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("8 80 73" , "8 99167" , "Smoke test case 8")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("9 90 84" , "9 15476" , "Smoke test case 9")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("10 100 90" , "10 23076518" , "Smoke test case 10")
defaultSuite.add(testCase)
return defaultSuite
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:35,代码来源:testCases.py
示例7: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite")
testCase = testTemplate.testInstance("a*b* aab" , "Matched" , "Smoke test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("a+b* a" , "Matched" , "Smoke test case 2")
defaultSuite.add(testCase)
return defaultSuite
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:9,代码来源:testCases.py
示例8: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite")
testCase = testTemplate.testInstance("5 5\n^^^^^\n^^^^^\n^^^^#\n^^^^^\n^^^^^" , "0" , "Smoke test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("5 7\n^^#^^^^\n^^#^#^#\n#^^^^^^\n^^#^^#^\n^^^^^^^" , "1" , "Smoke test case 2")
defaultSuite.add(testCase)
return defaultSuite
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:10,代码来源:testCases.py
示例9: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite")
testCase = testTemplate.testInstance("5 1 5 3 9 4" , "14" , "Smoke test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("5 1 2 3 4 5" , "9" , "Smoke test case 2")
defaultSuite.add(testCase)
return defaultSuite
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:10,代码来源:testCases.py
示例10: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite")
testCase = testTemplate.testInstance("5 5\nABCDE\nJIHGF\nABCCC\nDEFFF\nGGGGG" , "Case 1: 10" , "Smoke test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("0 0\n" , "" , "end of test")
defaultSuite.add(testCase)
return defaultSuite
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:10,代码来源:testCases.py
示例11: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite")
testCase = testTemplate.testInstance("10" , "?" , "Smoke test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("100" , "?" , "Smoke test case 2")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("500" , "?" , "Smoke test case 3")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("1000" , "?" , "Smoke test case 4")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("5000" , "?" , "Smoke test case 5")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("10000" , "?" , "Smoke test case 6")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("50000" , "?" , "Smoke test case 7")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("100000" , "?" , "Smoke test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("1" , "$" , "Graphical test case")
defaultSuite.add(testCase)
return defaultSuite
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:31,代码来源:testCases.py
示例12: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample test cases")
testcase = testTemplate.testInstance("5\n31 41 59\n26 53 58\n97 93 23\n84 62 64\n33 83 27" , "342" , "sample #1")
suite.add(testcase)
testcase = testTemplate.testInstance("1\n1 1 1" , "1" , "sample #2")
suite.add(testcase)
tests.append(suite)
return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:11,代码来源:testCases.py
示例13: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite",1)
testCase = testTemplate.testInstance("10 15 0 1 0 2 0 3 1 3 1 4 2 5 2 9 3 6 4 7 4 8 5 8 5 9 6 7 6 9 7 8" , "~\A\w* Cycle exists. Cycle: (\d\s)*" , "Graph1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("10 15 0 1 0 2 0 3 1 3 0 3 2 5 5 6 3 6 4 7 4 8 5 8 5 9 6 7 6 9 8 8" , "~\A\w* Cycle exists. Cycle: (\d\s)*" , "Graph1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("10 15 0 1 1 2 1 3 0 3 0 4 2 5 2 9 3 6 4 7 4 8 5 8 5 9 6 7 6 9 7 8" , "~\A\w* Cycle exists. Cycle: (\d\s)*" , "Graph1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("10 15 4 1 7 9 6 2 7 3 5 0 0 2 0 8 1 6 3 9 6 3 2 8 1 5 9 8 4 5 4 7" , "~\A\w* Cycle exists. Cycle: (\d\s)*" , "Graph1")
defaultSuite.add(testCase)
return defaultSuite
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:11,代码来源:testCases.py
示例14: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1",print_count=True)
testcase = testTemplate.testInstance("ask_not_what_your_country_can_do_for_you_ask_what_you_can_do_for_your_country ask_country" , "sk_not_what_your_c" , "sample1")
suite.add(testcase)
testcase = testTemplate.testInstance("acbbaca aba" , "baca" , "sample2")
suite.add(testcase)
tests.append(suite)
return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:11,代码来源:testCases.py
示例15: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite")
testCase = testTemplate.testInstance("asdfghj qweasdfghjbnm" , "7" , "Smoke test 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("asdfgbcnn qweasdfghjbnm" , "5" , "Smoke test 2")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("asdfghjkl qwertyuiop" , "0" , "Smoke test 3")
defaultSuite.add(testCase)
return defaultSuite
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:11,代码来源:testCases.py
示例16: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite")
testCase = testTemplate.testInstance("asdf afsdddsaf" , "4" , "Smoke test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("algorithm globalism" , "4" , "Smoke test case 2")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("asdf qwer" , "0" , "Boundary test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("asdf asdf" , "4" , "Boundary test case 2")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("aaaa aaaa" , "4" , "Boundary test case 3")
defaultSuite.add(testCase)
return defaultSuite
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:13,代码来源:testCases.py
示例17: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite")
testCase = testTemplate.testInstance("3 1 2 3 4 5 6 7 8 9" , "3 6 9 2 5 8 1 4 7" , "Smoke test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16" , "4 8 12 16 3 7 11 15 2 6 10 14 1 5 9 13" , "Smoke test case 2")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25" , "5 10 15 20 25 4 9 14 19 24 3 8 13 18 23 2 7 12 17 22 1 6 11 16 21" , "Smoke test case 3")
defaultSuite.add(testCase)
return defaultSuite
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:13,代码来源:testCases.py
示例18: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Smoke test suite")
testcase = testTemplate.testInstance("3\n1 2 3\n2 3 1\n3 1 2" , "3" , "sample")
suite.add(testcase)
testcase = testTemplate.testInstance("3\n1 2 3\n2 3 1\n1 3 2" , "3" , "anamoly")
suite.add(testcase)
testcase = testTemplate.testInstance("10 \n2 5 3 8 10 7 1 6 9 4\n1 2 3 4 5 6 7 8 9 10\n3 8 7 10 5 4 1 2 6 9" , "4" , "NKTEAM sample")
suite.add(testcase)
tests.append(suite)
return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:13,代码来源:testCases.py
示例19: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite")
testCase = testTemplate.testInstance("6 65 100 70 150 56 90 75 190 60 95 68 110" , "Solution is : (75,190) (70,150) (68,110) (65,100) (60,95) (56,90)" , "Smoke test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("7 65 100 63 93 70 150 56 90 75 190 60 95 68 110" , "Solution is : (75,190) (70,150) (68,110) (65,100) (60,95) (56,90)" , "Smoke test case 2")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("8 65 100 63 93 63 98 70 150 56 90 75 190 60 95 68 110" , "Solution is : (75,190) (70,150) (68,110) (65,100) (63,98) (63,93) (60,95) (56,90)" , "Smoke test case 2")
defaultSuite.add(testCase)
return defaultSuite
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:13,代码来源:testCases.py
示例20: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample 1")
testcase = testTemplate.testInstance("4 4\n1 1\n100 55 10 2\n20 10 90 1\n60 20 22 4\n1 30 70 5" , "Y 23" , "")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample 2")
testcase = testTemplate.testInstance("2 2\n1 1\n1 55 \n20 10 " , "N" , "")
suite.add(testcase)
tests.append(suite)
return tests
开发者ID:anant-pushkar,项目名称:competetive_programming_codes,代码行数:14,代码来源:testCases.py
注:本文中的testTemplate.testInstance函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论