Question: 7 . Forthis question, review the partial module code and the unit test code: math.py def add ( a , b ) : return a

7. Forthis question, review the partial module code and the unit test code:
math.py
def add(a, b) :
return a + b
def subract(a, b):
return a - b
Test_subtract.py
import unittest
from math import add, subtract
class TestMain (unittest.TestCase) :
def test_add (self) :
self.assertEqual(add (6,4),10)
def test_subract(self) :
self.assertEqual(subract(6,4),3)
When the unit test is executed, the test fails. Which of the following code statement will you modify for the unit
test to pass?
self. assertEqual (add (6,4),10)|
def test_subract(self)
self. assertEqual (subract (6,4),3)
from math import add

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!