

def test_using_dash_c(toolchains, args):
    foo_tc = toolchains.create('foo')
    qibuild.config.add_build_config('bar', toolchain='foo')
    qibuild.config.add_build_config('baz')
    toolchains.config = 'bar'
    assert (qitoolchain.parsers.get_toolchain(args) == foo_tc)
    args.config = 'baz'
    with pytest.raises(qisys.error.Error) as e:
        qitoolchain.parsers.get_toolchain(args)
    assert ('config baz has no toolchain' in e.value.message)

dataset/ETHPy150Open aldebaran/qibuild/python/qitoolchain/test/test_parsers.py test_using_dash_c/VarMisuse@43/65 `args`->`toolchains`