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")
    args.config = "bar"
    assert qitoolchain.parsers.get_toolchain(args) == foo_tc
    args.config = "baz"
    # pylint: disable-msg=E1101
    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/original