A.assertIn()B.assertNotIn()C.assertTrue()D.assertEqual()
单项选择题在unittest中,如何检查两个字符串是否相等()
A.assert()B.assertTrue()C.assertEqual()D.assertNotEqual()
单项选择题下面哪个方法用于检查一个对象是否为True()
单项选择题如何使用测试套件运行多个测试用例类()
A.创建多个TestSuite对象并使用addTest()方法添加测试用例类B.在一个测试用例类中定义多个测试方法C.在一个测试用例类中定义多个测试方法和setUp()方法D.在一个测试用例类中定义多个测试方法和tearDown()方法
单项选择题安装unittest2后,需要使用哪个命令运行测试()
A.python test.pyB.python -m unittestC.pytestD.nose
单项选择题在安装unittest2之前,需要先安装哪个包()
A.setuptoolsB.pipC.wheelD.virtualenv
单项选择题unittest中的TestLoader用于什么()
A.用于创建测试用例B.用于运行测试用例C.用于管理测试用例D.用于加载测试用例
单项选择题unittest中的TestSuite用于什么()
A.用于创建测试用例B.用于运行测试用例C.用于管理测试用例D.用于组织测试用例
单项选择题在unittest中,如何为测试用例设置后置条件()
A.在测试用例中添加tearDown()方法B.在测试用例中添加setUp()方法C.在测试用例中添加postCondition()方法D.在测试用例中添加preCondition()方法
单项选择题在unittest中,如何表示测试用例的一个步骤()
A.使用print语句输出日志信息B.使用注释表示步骤C.使用setUp()和tearDown()方法包裹步骤D.使用addStep()方法表示步骤
单项选择题unittest中的断言用于什么()
A.检查测试用例的输出B.检查测试用例的输入C.检查测试用例的执行结果D.检查测试用例的性能