Skip to content

Commit

Permalink
fix main method call
Browse files Browse the repository at this point in the history
  • Loading branch information
yashinomi committed Nov 12, 2020
1 parent 3622ffb commit 5832d2b
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions calc_py/test_parse_equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,5 @@ def test_mult(self):
self.assertEqual(correct, result)


def main():
try:
correct: int = 3
equation: str = "0+1*3"
result = parse_add_or_minus(equation)
assert correct == result, f"want {correct}, got {result}"

correct: int = -1
equation: str = "0*3-1"
result = parse_add_or_minus(equation)
assert correct == result, f"want {correct}, got {result}"

correct: int = 0
equation: str = "2/2-1"
result = parse_add_or_minus(equation)
assert correct == result, f"want {correct}, got {result}"

correct: int = 5
equation: str = "2+3+1-2/2"
result = parse_add_or_minus(equation)
assert correct == result, f"want {correct}, got {result}"

except AssertionError as err:
print("AssertionError :", err)


if __name__ == "__main__":
main()
unittest.main()

0 comments on commit 5832d2b

Please sign in to comment.