From b236f6ab737ae93ba62d3eb24aea9be5337eceb1 Mon Sep 17 00:00:00 2001 From: KKlochko Date: Sat, 1 Apr 2023 12:29:25 +0300 Subject: [PATCH] Added mul function. --- poetry_template/main.py | 6 +++++- tests/test_main.py | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/poetry_template/main.py b/poetry_template/main.py index 1837c15..a965416 100644 --- a/poetry_template/main.py +++ b/poetry_template/main.py @@ -1,3 +1,7 @@ def sum(a, b): - return a+b \ No newline at end of file + return a+b + +def mul(a, b): + return a*b + diff --git a/tests/test_main.py b/tests/test_main.py index e287f03..08085e8 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,5 +1,5 @@ import pytest -from poetry_template.main import sum +from poetry_template.main import sum, mul def test_sum(): a = 1 @@ -15,3 +15,10 @@ def test_sum_wrong(): s_wrong = 4 assert s_wrong == sum(a, b) + +def test_mul(): + a = 1 + b = 2 + m = 2 + + assert m == mul(a, b)