Skip to content

Commit

Permalink
Faulty
Browse files Browse the repository at this point in the history
  • Loading branch information
smythi93 committed Aug 3, 2023
1 parent 68ba79b commit 7b08a1d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/expression/expr/arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def evaluate(self):
class Div(Binary):
def evaluate(self):
l, r = self.left.evaluate(), self.right.evaluate()
assert r != 0
return l / r


Expand Down
2 changes: 0 additions & 2 deletions tests/test_evaluate.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from unittest import TestCase

from expression.evaluate import evaluate
from expression.expr.arithmetic import Constant, Div, Add, Mul
from expression.expr.parse import parse


class TestEvaluate(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from expression.expr.arithmetic import Constant, Div, Add, Mul


class TestMiddle(TestCase):
class TestExpr(TestCase):
def test_constant(self):
term = Constant(0)
self.assertEqual(0, term.evaluate())
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from expression.expr.parse import parse


class TestMiddle(TestCase):
class TestParse(TestCase):
def test_parse_constant(self):
term = parse("0")
self.assertIsInstance(term, Constant)
Expand Down

0 comments on commit 7b08a1d

Please sign in to comment.