單項選擇題在Pytest中,以下哪個函數(shù)用于判斷一個條件是否為真()

A.assertTrue()
B.assertFalse()
C.assertRaises()
D.assertIs()


你可能感興趣的試題

1.單項選擇題在PyTest中,以下哪個函數(shù)可以測試一個函數(shù)是否引發(fā)了指定的異常()

A.pytest.raises()
B.pytest.assert_called()
C.pytest.assert_raises()
D.pytest.expect_exception()

2.單項選擇題在使用PyTest進(jìn)行單元測試時,下列哪種方式可以標(biāo)識一個測試函數(shù)()

A.使用test 裝飾器
B.使用pytest.mark.test 標(biāo)記
C.使用def test_開頭的函數(shù)名
D.使用def test()的函數(shù)名

3.單項選擇題以下哪個選項可以在PyTest中設(shè)置測試用例執(zhí)行的順序()

A.使用pytest.mark.parametrize
B.使用pytest.mark.dependency
C.使用pytest.mark.xfail
D.無法設(shè)置測試用例執(zhí)行的順序

4.單項選擇題在Pytest中,哪個插件用于生成測試覆蓋率報告()

A.pytest-coverage
B.pytest-html
C.pytest-xdist
D.pytest-flask

5.單項選擇題在Pytest中哪個命令用于生成測試報告()

A.pytest report
B.pytest summary
C.pytest junitxml
D.pytest html