Skip to content

Commit

Permalink
Merge branch 'main' into multiply
Browse files Browse the repository at this point in the history
  • Loading branch information
nikishe authored Nov 1, 2022
2 parents fe17769 + 9d1cb6c commit c0c7193
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pythoncalculator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from .add import add
from .multiply import multiply
from .divide import divide
from .subtract import subtract
2 changes: 2 additions & 0 deletions pythoncalculator/divide.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def divide(x, y):
return x / y
2 changes: 2 additions & 0 deletions pythoncalculator/subtract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def subtract(x, y):
return x - y
5 changes: 5 additions & 0 deletions tests/test_divide.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from pythoncalculator import divide


def test_divide():
assert divide(10, 2) == 5
5 changes: 5 additions & 0 deletions tests/test_subtract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from pythoncalculator import subtract


def test_subtract():
assert subtract(1, 3) == -2

0 comments on commit c0c7193

Please sign in to comment.