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)
评论列表
文章目录