test_gi.py 文件源码

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

项目:driveboardapp 作者: nortd 项目源码 文件源码
def test_gi2_repository(pyi_builder, repository_name):
    '''
    Test the importability of the `gi.repository` subpackage with the passed
    name installed with PyGObject >= 2.0 (e.g., `GLib`, corresponding to the
    `gi.repository.GLib` subpackage).
    '''

    # Test the importability of this subpackage.
    pyi_builder.test_source('''
        import gi
        gi.require_version('{repository_name}', '2.0')
        from gi.repository import {repository_name}
        print({repository_name})
        '''.format(repository_name=repository_name))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号