__init__.py 文件源码

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

项目:kscore 作者: liuyichen 项目源码 文件源码
def skip_unless_has_memory_collection(cls):
    """Class decorator to skip tests that require memory collection.

    Any test that uses memory collection (such as the resource leak tests)
    can decorate their class with skip_unless_has_memory_collection to
    indicate that if the platform does not support memory collection
    the tests should be skipped.
    """
    if platform.system() not in ['Darwin', 'Linux']:
        return unittest.skip('Memory tests only supported on mac/linux.')(cls)
    return cls
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号