def test_init__empty_tests(self):
suite = unittest2.TestSuite([])
self.assertEqual(suite.countTestCases(), 0)
# countTestCases() still works after tests are run
suite.run(unittest.TestResult())
self.assertEqual(suite.countTestCases(), 0)
# "class TestSuite([tests])"
# ...
# "If tests is given, it must be an iterable of individual test cases
# or other test suites that will be used to build the suite initially"
#
# TestSuite should allow any iterable to provide tests
test_suite.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录