Question: 7 . Forthis question, review the partial module code and the unit test code: math.py def add ( a , b ) : return a
Forthis question, review the partial module code and the unit test code:
math.py
def adda b :
return a b
def subracta b:
return a b
Testsubtract.py
import unittest
from math import add, subtract
class TestMain unittestTestCase :
def testadd self :
self.assertEqualadd
def testsubractself :
self.assertEqualsubract
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
def testsubractself
self. assertEqual subract
from math import add
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
