Source code for cfme.fixtures.dev_branch

# -*- coding: utf-8 -*-
import pytest

[docs]def pytest_addoption(parser): group = parser.getgroup('Upstream testing') group.addoption('--dev-repo', action='store', default=None, dest='dev_repo', help='Specify to use the IPAppliance.use_dev_branch()') group.addoption('--dev-branch', action='store', default='master', dest='dev_branch', help='Specify the branch of the remote repo.')
[docs]def pytest_sessionstart(session): if == 'master': return if session.config.getoption("dev_repo") is None: return if"Cannot git update downstream appliances ...") pytest.exit('Failed to git update this appliance, because it is downstream') dev_repo = session.config.getoption("dev_repo") dev_branch = session.config.getoption("dev_branch") "Changing the upstream appliance {} to {}#{} ...".format(, dev_repo, dev_branch)), dev_branch)"Appliance change finished ...")