plugin.py 文件源码

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

项目:pytest-web2py.wip 作者: matclab 项目源码 文件源码
def pytest_configure(config):

    # allow imports from modules and site-packages
    w2pdir = os.path.abspath(config.option.w2p_root)
    config.option.w2p_root = w2pdir
    sys.path.insert(0, w2pdir)

    app_directory = _appdir(config)

    conffile = os.path.join(app_directory, "logging.conf")
    if os.path.isfile(conffile):
        logging.config.fileConfig()
    else:
        logging.basicConfig()
    logger = logging.getLogger("pytest_web2py")
    logger.addHandler(logging.NullHandler())
    logger.setLevel(logging.DEBUG)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号