第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

python覆蓋率缺少測試

python覆蓋率缺少測試

ITMISS 2021-07-09 14:01:53
我正在運(yùn)行 python 覆蓋率,但我的覆蓋率不是 100%。def add(a, b):    return a + btest_utils.pyfrom python_coverage import utilsimport unittestclass TestAdd(unittest.TestCase):    """    Test the add function from the mymath library    """    def test_add_integers(self):        """        Test that the addition of two integers returns the correct total        """        result = utils.add(1, 2)        self.assertEqual(result, 3)    def test_add_floats(self):        """        Test that the addition of two floats returns the correct result        """        result = utils.add(10.5, 2)        self.assertEqual(result, 12.5)    def test_add_strings(self):        """        Test the addition of two strings returns the two string as one        concatenated string        """        result = utils.add('abc', 'def')        self.assertEqual(result, 'abcdef')if __name__ == '__main__':    unittest.main()        覆蓋率報(bào)告 -mName                          Stmts   Miss  Cover   Missing-----------------------------------------------------------python_coverage/__init__.py       0      0   100%python_coverage/utils.py          2      1    50%   2tests/test_utils.py              12      6    50%   7-8, 11-12, 15-16-----------------------------------------------------------TOTAL                            14      7    50%我從該鏈接復(fù)制代碼并運(yùn)行報(bào)告,這是它 -Name                          Stmts   Miss  Cover   Missing-----------------------------------------------------------python_coverage/__init__.py       0      0   100%python_coverage/utils.py          2      1    50%   2tests/test_utils.py              14      8    43%   14-15, 21-22, 29-33-----------------------------------------------------------TOTAL                            16      9    44%
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 147 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號