rhunittest.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
def __init__(self, methodName):
        # Pass the method name unmodified to the base class; this ensures that
        # when run in Eclipse's PyDev, the implementation shows up next to the
        # test name. This also means that __getattr__ must be overridden to
        # find the original method.
        unittest.TestCase.__init__(self, methodName)

        # Save the implementation so that it is available in setUp().
        # NOTE: Using type() ensures that the correct class object is queried,
        # so the implementation list is correct--a static call via RHTestCase
        # always returns an un-mangled name.
        name, impl = type(self).splitImpl(methodName)
        if not impl:
            # This should only occur with a single implementation, where name
            # mangling is disabled.
            self.impl = self.__impls__[0]
        else:
            self.impl = impl
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号