rhunittest.py 文件源码

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

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
def __init__(self, name, bases, classdict):
        type.__init__(self, name, bases, classdict)
        spd_file = classdict.get('SPD_FILE', None)
        if spd_file:
            # Get the module that contains the test case class. This allows us
            # to find the SPD file relative to its location.
            module = inspect.getmodule(self)
            module_path = os.path.dirname(module.__file__)
            spd_path = os.path.normpath(os.path.join(module_path, spd_file))

            # Parse the SPD to get the implementation IDs.
            spd = SPDParser.parse(spd_path)
            self.__impls__ = [impl.get_id() for impl in spd.get_implementation()]

            # Update the path to the SPD file.
            self.spd_file = spd_path
        else:
            self.spd_file = None
            self.__impls__ = ()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号