def check_module_import_error(self, error, test, attr='sdasfasfasdf', regex='(unittest2)?sdasfasfasdf'):
try:
self._check_module_lookup_error(
error, test, ImportError,
"No module named ", attr, regex)
except self.failureException:
self._check_module_lookup_error(
error, test, ImportError,
"No module named ", attr, regex)
# "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."
#
# What happens when the module is found, but the attribute isn't?
test_loader.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录