Exemple #1
0
 def test_challenge_4_1(self):
     equation = '(3 * 4) * 2 + 1'
     assert challenge4.s(equation) == '3 4 * 2 * 1 +'
Exemple #2
0
 def test_challenge_4_2(self):
     equation = '(5 - 6) * 2 / (1 + 3)'
     assert challenge4.s(equation) == '5 6 - 2 * 1 3 + /'
Exemple #3
0
 def test_challenge_4_8(self):
     equation = '(((((((((1+2)))))))))'
     assert challenge4.s(equation) == '1 2 +'
Exemple #4
0
 def test_challenge_4_9(self):
     equation = '(((12)+(21)))'
     assert challenge4.s(equation) == '12 21 +'
Exemple #5
0
 def test_challenge_4_7(self):
     equation = '((4+7)*12+2)/4'
     assert challenge4.s(equation) == '4 7 + 12 * 2 + 4 /'
Exemple #6
0
 def test_challenge_4_6(self):
     equation = '4 ^ (3 - 1)'
     assert challenge4.s(equation) == '4 3 1 - ^'
Exemple #7
0
 def test_challenge_4_5(self):
     equation = '(4 ^ 2) * 3'
     assert challenge4.s(equation) == '4 2 ^ 3 *'
Exemple #8
0
 def test_challenge_4_4(self):
     equation = '((5 - 3) * ((4 / 2 - 1) * 2))'
     assert challenge4.s(equation) == '5 3 - 4 2 / 1 - 2 * *'
Exemple #9
0
 def test_challenge_4_3(self):
     equation = '(4 - 1) / (2 - 3)'
     assert challenge4.s(equation) == '4 1 - 2 3 - /'