def test_loadTestsFromNames__unknown_name_relative_1(self):
loader = unittest.TestLoader()
suite = loader.loadTestsFromNames(['sdasfasfasdf'], unittest)
error, test = self.check_deferred_error(loader, list(suite)[0])
self.check_module_lookup_error(error, test, 'unittest2')
# "The specifier name is a ``dotted name'' that may resolve either to
# a module, a test case class, a TestSuite instance, a test method
# within a test case class, or a callable object which returns a
# TestCase or TestSuite instance."
# ...
# "The method optionally resolves name relative to the given module"
#
# Do unknown attributes (relative to a provided module) still raise an
# exception even in the presence of valid attribute names?
test_loader.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录