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