__init__.py 文件源码

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

项目:ramdisk-func-test 作者: openstack 项目源码 文件源码
def setUpClass(cls):
        template_path = []
        template_uniq = set()
        for member in cls.__mro__:
            try:
                path = member._rft_template_path
            except AttributeError:
                continue

            if isinstance(path, basestring):
                path = [path]
            elif isinstance(path, collections.Sequence):
                pass
            else:
                path = [path]

            uniq_path = set(path) - template_uniq
            template_uniq.update(uniq_path)
            template_path.extend(x for x in path if x in uniq_path)

        cls.env = environment.Environment(template_path, cls._rft_config_path)
        cls.env.setupclass()

        super(TestCaseMixin, cls).setUpClass()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号