blob: 279a517477a586f27a42d666eecf5830b9692af5 [file] [log] [blame]
# Pylint doesn't play well with fixtures and dependency injection from pytest
# pylint: disable=redefined-outer-name
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# For utils.get_bst_version()
from buildstream import utils
def assert_version(cli_version_output):
major, minor = utils.get_bst_version()
expected_start = "{}.{}".format(major, minor)
if not cli_version_output.startswith(expected_start):
raise AssertionError(
"Version output expected to begin with '{}',".format(expected_start)
+ " output was: {}".format(cli_version_output)
def test_version(cli):
result =["--version"])