單項選擇題在Pytest中,哪個函數(shù)用于在測試用例運行之前執(zhí)行一次性設(shè)置()

A.setup()
B.before_test()
C.teardown()
D.setup_method()


你可能感興趣的試題

1.單項選擇題在Pytest中,哪個斷言用于比較兩個值是否相等()

A.assert
B.assertEqual
C.assertAlmostEqual
D.assertNotEqual

2.單項選擇題在PyTest中,測試文件應(yīng)該以什么為前綴()

A.test
B.py
C.testfile
D.testcase

3.單項選擇題在PyTest中,如何使用斷言()

A.使用assert語句
B.使用check()函數(shù)
C.使用verify()函數(shù)
D.使用expect()函數(shù)

4.單項選擇題在PyTest中,如何使用fixture()

A.使用pytest.mark.fixture 標(biāo)注
B.使用pytest.fixture 標(biāo)注
C.使用pytest.use_fixture 標(biāo)注
D.使用pytest.testfixture 標(biāo)注

5.單項選擇題在PyTest中,如何運行測試用例()

A.運行python test.py命令
B.運行pytest test.py命令
C.運行unittest test.py命令
D.運行test.py命令