假设我们有以下功能:
import unittest
def func_test():
indicator = True
if(indicator == True):
a = 5
b = 10
total = a+b
return total
else:
a = 6
b = 10
total = a*b
return total
class TestJob(unittest.TestCase)
total = func_test(indicator = True)
def test_func_test(self):
self.assertGreater(total, 0)
我们如何测试
else
单元测试的条件?