def test_unary_with_combined_signs(): expr = '-+-+-+-+-78.92' parser = ExpressionParser(expr) assert parser.unary() == -78.92
def test_unary_with_multiple_plus_signs(): expr = '+++++++++++17.31230' parser = ExpressionParser(expr) assert parser.unary() == 17.3123
def test_unary_triple_negation(): expr = '---20' parser = ExpressionParser(expr) assert parser.unary() == -20
def test_unary_with_plus_sign(): expr = '+09.23' parser = ExpressionParser(expr) assert parser.unary() == 9.23
def test_unary_double_negation(): expr = '--19.60' parser = ExpressionParser(expr) assert parser.unary() == 19.60