예제 #1
0
 def test_space_removal(self):
     assert calculate.convertUnaryOperators('1 + 1 - 1') == '1+1-1'
예제 #2
0
 def test_plus_with_binary_plus(self):
     assert calculate.convertUnaryOperators('1++1') == '1+1'
예제 #3
0
 def test_empty_string(self):
     assert calculate.convertUnaryOperators('') == ''
예제 #4
0
 def test_double_plus(self):
     assert calculate.convertUnaryOperators('++1') == '1'
예제 #5
0
 def test_minus_after_right_bracket(self):
     assert calculate.convertUnaryOperators('(1)-1') == '(1)-1'
예제 #6
0
 def test_minus_with_binary_minus(self):
     assert calculate.convertUnaryOperators('1--1') == '1-m1'
예제 #7
0
 def test_triple_minus(self):
     assert calculate.convertUnaryOperators('---1') == 'mmm1'
예제 #8
0
 def test_single_minus(self):
     assert calculate.convertUnaryOperators('-1') == 'm1'