本文整理汇总了Python中testTemplate.testSuite函数的典型用法代码示例。如果您正苦于以下问题:Python testSuite函数的具体用法?Python testSuite怎么用?Python testSuite使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了testSuite函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1")
testcase = testTemplate.testInstance("AC|T\nL" , "AC|TL" , "sample")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite2")
testcase = testTemplate.testInstance("|ABC\nXYZ" , "XYZ|ABC" , "sample")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite3")
testcase = testTemplate.testInstance("W|T\nF" , "Impossible" , "sample")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite4")
testcase = testTemplate.testInstance("ABC|\nD" , "Impossible" , "sample")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite5")
testcase = testTemplate.testInstance("A|SD\nQWE" , "AQW|SDE" , "sample")
suite.add(testcase)
tests.append(suite)
return tests
示例2: 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
示例3: 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
示例4: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1")
testcase = testTemplate.regexTester("11" , "13" , "sample1")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite1.1")
testcase = testTemplate.regexTester("111" , "136" , "sample1")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite1.2")
testcase = testTemplate.regexTester("112" , "139" , "sample1")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite2")
testcase = testTemplate.regexTester("16" , "23" , "sample2")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite3")
testcase = testTemplate.regexTester("123" , "164" , "sample3")
suite.add(testcase)
tests.append(suite)
return tests
示例5: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1",print_count=True)
testcase = testTemplate.regexTester("5\nD B\nD C\nD A\nB A\nC A" , "Case 1: 1 D,A " , "sample1")
suite.add(testcase)
testcase = testTemplate.regexTester("6\nD B\nD C\nD A\nC B\nB A\nC A" , "Case 2: 3 C,A D,A D,B " , "sample2")
suite.add(testcase)
testcase = testTemplate.regexTester("1\nA B" , "Case 3: 0 " , "sample3")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("string Test Suite1",print_count=True)
testcase = testTemplate.regexTester("5\nDa Ba\nDa Ca\nDa Aa\nBa Aa\nCa Aa" , "Case 1: 1 Da,Aa " , "sample1")
suite.add(testcase)
testcase = testTemplate.regexTester("6\nD1 B1\nD1 C1\nD1 A1\nC1 B1\nB1 A1\nC1 A1" , "Case 2: 3 C1,A1 D1,A1 D1,B1 " , "sample2")
suite.add(testcase)
testcase = testTemplate.regexTester("1\nA# B#" , "Case 3: 0 " , "sample3")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("custom Test Suite1",print_count=True)
testcase = testTemplate.regexTester("6\nA B\nA C\nA D\nB C\nB D\nC D" , "Case 1: 3 A,C A,D B,D " , "custom1")
suite.add(testcase)
testcase = testTemplate.regexTester("6\nA B\nA C\nA D\nB C\nB D\nD C" , "Case 2: 3 A,C A,D B,C " , "custom2")
suite.add(testcase)
tests.append(suite)
return tests
示例6: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1")
testcase = testTemplate.regexTester("6 2 3\n2 2 2 2 1 1" , "2" , "sample")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite2")
testcase = testTemplate.regexTester("2 5 1\n5 8" , "9" , "sample")
suite.add(testcase)
tests.append(suite)
return tests
示例7: 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
示例8: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("nested dependency test")
testcase = testTemplate.testInstance("1" , "D1 success fully called\nD2 success fully called" , "test case 1")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("direct dependency test")
testcase = testTemplate.testInstance("2" , "D3 success fully called" , "test case 1")
suite.add(testcase)
tests.append(suite)
return tests
示例9: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1",print_count=True)
testcase = testTemplate.regexTester("808" , "818" , "sample1")
suite.add(testcase)
testcase = testTemplate.regexTester("2133" , "2222" , "sample1")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Custom Test Suite",print_count=True)
testcase = testTemplate.regexTester("999" , "1001" , "all9_odd")
suite.add(testcase)
testcase = testTemplate.regexTester("909" , "919" , "notall9_odd")
suite.add(testcase)
testcase = testTemplate.regexTester("9009" , "9119" , "notall9_even")
suite.add(testcase)
testcase = testTemplate.regexTester("9999" , "10001" , "all9_even")
suite.add(testcase)
testcase = testTemplate.regexTester("9998" , "9999" , "arbit1")
suite.add(testcase)
testcase = testTemplate.regexTester("9989" , "9999" , "arbit2")
suite.add(testcase)
testcase = testTemplate.regexTester("9898" , "9999" , "arbit3")
suite.add(testcase)
testcase = testTemplate.regexTester("1824" , "1881" , "reflect_even")
suite.add(testcase)
testcase = testTemplate.regexTester("18534" , "18581" , "reflect_odd")
suite.add(testcase)
testcase = testTemplate.regexTester("1234" , "1331" , "propogate_even")
suite.add(testcase)
testcase = testTemplate.regexTester("1994" , "2002" , "propogate_even_carry")
suite.add(testcase)
testcase = testTemplate.regexTester("12345" , "12421" , "propogate_odd")
suite.add(testcase)
testcase = testTemplate.regexTester("12945" , "13031" , "propogate_odd_carry1")
suite.add(testcase)
testcase = testTemplate.regexTester("1299945" , "1300031" , "propogate_odd_carry2")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("gfg_examples",print_count=True)
testcase = testTemplate.regexTester("23545" , "23632" , "example1")
suite.add(testcase)
testcase = testTemplate.regexTester("1221" , "1331" , "example2")
suite.add(testcase)
tests.append(suite)
return tests
示例10: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1")
testcase = testTemplate.regexTester("16 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1" , "?" , "sample")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Sample Test Suite1")
testcase = testTemplate.regexTester("8 1 1 0 1 1 0 1 1" , "?" , "sample")
suite.add(testcase)
tests.append(suite)
return tests
示例11: getTests
def getTests():
defaultSuite = testTemplate.testSuite("Default Test Suite")
testCase = testTemplate.testInstance("13 3 5 7 9 20 25 30 40 55 56 57 60 62 11 1 4 7 11 14 25 44 47 55 57 100" , "450" , "Smoke test case 1")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("4 -5 100 1000 1005 3 -12 1000 1001" , "2100" , "Smoke test case 2")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("4 1 2 3 4 4 5 6 7 8 " , "26" , "Smoke test case 3")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("4 1 2 3 4 4 11 22 22 33" , "88" , "Smoke test case 4")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("4 1 2 3 4 1 1100" , "1100" , "Smoke test case 5")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("4 1 2 3 4 3 3 7 10 " , "23" , "Smoke test case 6")
defaultSuite.add(testCase)
testCase = testTemplate.testInstance("4 -30 -20 -10 10 4 -100 -80 -60 -30" , "-30" , "Smoke test case 7")
defaultSuite.add(testCase)
return defaultSuite
示例12: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1")
testcase = testTemplate.regexTester("1" , "Yes" , "sample1")
suite.add(testcase)
testcase = testTemplate.regexTester("2" , "Yes" , "sample2")
suite.add(testcase)
testcase = testTemplate.regexTester("7" , "No" , "sample3")
suite.add(testcase)
testcase = testTemplate.regexTester("14" , "No" , "sample4")
suite.add(testcase)
testcase = testTemplate.regexTester("49" , "Yes" , "sample5")
suite.add(testcase)
testcase = testTemplate.regexTester("9" , "Yes" , "sample6")
suite.add(testcase)
testcase = testTemplate.regexTester("17" , "Yes" , "sample7")
suite.add(testcase)
testcase = testTemplate.regexTester("76" , "No" , "sample8")
suite.add(testcase)
testcase = testTemplate.regexTester("2888" , "Yes" , "sample9")
suite.add(testcase)
testcase = testTemplate.regexTester("27" , "No" , "sample10")
suite.add(testcase)
tests.append(suite)
return tests
示例13: 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
示例14: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1",print_count=True)
for x in xrange(4000):
n1 = random.randint(1,50)
n2 = random.randint(1,50)
a1 = []
a2 = []
for i in xrange(n1):
n = random.randint(1,1000000)
a1.append(n)
for i in xrange(n2):
n = random.randint(1,1000000)
a2.append(n)
a1.sort()
s1 = " ".join([str(a) for a in a1])
a2.sort()
s2 = " ".join([str(a) for a in a2])
arr = a1+a2
arr.sort();
k = random.randint(1,len(arr)-1)
m = arr[k-1]
testcase = customTester(str(n1)+" "+str(n2)+" "+str(k)+"\n"+s1+"\n"+s2 , str(m) , "sample#"+str(x))
suite.add(testcase)
tests.append(suite)
return tests
示例15: getTests
def getTests():
tests = []
suite=testTemplate.testSuite("Sample Test Suite1" , print_count=True)
testcase = testTemplate.testInstance("abbabaab" , "2" , "sample")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testSuite("Custom Test Suite1" , print_count=True)
testcase = testTemplate.testInstance("aaaaaa" , "1" , "custom1")
suite.add(testcase)
testcase = testTemplate.testInstance("baaabababaab" , "2" , "custom2")
suite.add(testcase)
tests.append(suite)
return tests