Example #1
0
def testStrike():
    soma = bowl.CalcularPlacar('X818181818181818181')
    assert soma == 100, soma


#def testStrike2():
#	soma = bowl.CalcularPlacar('X8181818181818181XXX')
#	assert soma == 121, soma

#def testTudoStrike():
#	soma = bowl.CalcularPlacar('XXXXXXXXXXXX')
#	assert soma == 300, soma
Example #2
0
def testSimples2():
    soma = bowl.CalcularPlacar("1-2-3-4-5-6-7-8-9---")
    assert soma == 45, soma
Example #3
0
def testUltimoSpare():
    soma = bowl.CalcularPlacar('8/71815/81818181818/8')
    assert soma == 115, soma
Example #4
0
def testSimples():
    soma = bowl.CalcularPlacar("9-9-9-9-9-9-9-9-9-9-")
    assert soma == 90, soma
Example #5
0
def testSpare3():
    soma = bowl.CalcularPlacar('8/71815/818181818181')
    assert soma == 106, soma
Example #6
0
def testSpare2():
    soma = bowl.CalcularPlacar('8/718181818181818181')
    assert soma == 97, soma
Example #7
0
def testSpare():
    soma = bowl.CalcularPlacar("8/818181818181818181")
    assert soma == 99, soma
Example #8
0
def testSemCanaleta():
    soma = bowl.CalcularPlacar("81818181818181818181")
    assert soma == 90, soma