From 0583c2d933f42680800cfe8dfa4271308b811cdb Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 20 Jan 2022 16:08:30 +0000 Subject: [PATCH 1/3] add multiply function --- pythoncalculator/multiply.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 pythoncalculator/multiply.py diff --git a/pythoncalculator/multiply.py b/pythoncalculator/multiply.py new file mode 100644 index 0000000..e69de29 From 1143fb2c62d7f68ffa24c461139a3d039a3e8a9f Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 20 Jan 2022 16:11:22 +0000 Subject: [PATCH 2/3] import multiply function --- pythoncalculator/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythoncalculator/__init__.py b/pythoncalculator/__init__.py index c54c73e..eaca681 100644 --- a/pythoncalculator/__init__.py +++ b/pythoncalculator/__init__.py @@ -1,2 +1,2 @@ from .add import add - +from .multiply import multiply From a33a96f0332e7cb460999a1854732e6cc8b5596f Mon Sep 17 00:00:00 2001 From: rob Date: Thu, 20 Jan 2022 16:13:56 +0000 Subject: [PATCH 3/3] add test multiply --- pythoncalculator/multiply.py | 2 ++ tests/test_multiply.py | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 tests/test_multiply.py diff --git a/pythoncalculator/multiply.py b/pythoncalculator/multiply.py index e69de29..43dfa55 100644 --- a/pythoncalculator/multiply.py +++ b/pythoncalculator/multiply.py @@ -0,0 +1,2 @@ +def multiply(x, y): + return x * y \ No newline at end of file diff --git a/tests/test_multiply.py b/tests/test_multiply.py new file mode 100644 index 0000000..9a68ecc --- /dev/null +++ b/tests/test_multiply.py @@ -0,0 +1,6 @@ +from pythoncalculator import multiply + + +def test_multiply(): + assert multiply(10, 3) == 30 + \ No newline at end of file