runner.py 文件源码

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

项目:dancedeets-monorepo 作者: mikelambert 项目源码 文件源码
def setup():
    if os.path.exists('frankenserver/python'):
        sdk_path = 'frankenserver/python'
    else:  # running on travis
        sdk_path = '../google_appengine'

    # If the SDK path points to a Google Cloud SDK installation
    # then we should alter it to point to the GAE platform location.
    if os.path.exists(os.path.join(sdk_path, 'platform/google_appengine')):
        sdk_path = os.path.join(sdk_path, 'platform/google_appengine')

    # Make sure google.appengine.* modules are importable.
    fixup_paths(sdk_path)

    # Make sure all bundled third-party packages are available.
    import dev_appserver
    dev_appserver.fix_sys_path()
    from google.appengine.ext import vendor
    vendor.add('lib-local')
    vendor.add('lib-both')

    # Loading appengine_config from the current project ensures that any
    # changes to configuration there are available to all tests (e.g.
    # sys.path modifications, namespaces, etc.)
    try:
        import appengine_config
        (appengine_config)
    except ImportError:
        print('Note: unable to import appengine_config.')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号