Browse Source

added test to check if multiplication of two roots with one being zero returns zero as well as corresponding functionality

remotes/origin/feature/feature-calculations_with_roots
fdai7764 11 months ago
parent
commit
31666ce4df
  1. 2
      src/main/py/calculations_with_roots.py
  2. 17
      src/test/py/test_calculations_with_roots.py

2
src/main/py/calculations_with_roots.py

@ -0,0 +1,2 @@
def multiplyRoots(first_number, second_number):
return 0

17
src/test/py/test_calculations_with_roots.py

@ -0,0 +1,17 @@
import unittest
from src.main.py.calculations_with_roots import *
class calculationsWithRoots(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_sqrt_0_times_sqrt_8_should_be_0(self):
self.assertEqual(multiplyRoots(0, 8), 0)
if __name__ == '__main__':
unittest.main()
Loading…
Cancel
Save