def pytest_configure(config):
settings['SCREENSHOTS_PATH'] = config.getoption('screenshots_path')
settings['PDIFF_PATH'] = config.getoption('pdiff_path')
settings['ALLOW_SCREENSHOT_CAPTURE'] = config.getoption('allow_screenshot_capture')
if 'ALLOW_SCREENSHOT_CAPTURE' in os.environ:
settings['ALLOW_SCREENSHOT_CAPTURE'] = True
try:
from sh import compare
settings['USE_IMAGEMAGICK'] = True
except ImportError:
pass
try:
from sh import perceptualdiff
settings['USE_PERCEPTUALDIFF'] = True
except ImportError:
pass
pytest_selenium_pdiff.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录