def test_displays_git_info(tmpdir, git_server, feed, qitoolchain_action):
    boost_package = qitoolchain.qipackage.QiPackage("boost", version="1.44")
    feed.add_package(boost_package)
    git_server.create_repo("toolchains.git")
    git_server.change_branch("toolchains.git", "devel")
    git_server.push_file("toolchains.git", "feeds/bar.xml", feed.feed_xml.read(),
                         branch="devel")

    feed_url = git_server.get_repo("toolchains.git").clone_url

    git = qisrc.git.Git(tmpdir.strpath)
    _, out = git.call("ls-remote", feed_url, "devel", raises=False)
    devel_sha1 = out.split()[0][:8]

    qitoolchain_action("create", "--feed-name", "bar", "--branch", "devel", "foo", feed_url)
    foo_tc = qitoolchain.get_toolchain("foo")
    as_str = str(foo_tc)
    assert "on devel" in as_str
    assert "(feeds/bar.xml)" in as_str
    assert "from %s" % feed_url in as_str
    assert devel_sha1 in as_str
dataset/ETHPy150Open aldebaran/qibuild/python/qitoolchain/test/test_toolchain.py/test_displays_git_info/original