def test_required_installation_error(): dc = DirectoryContext(test_config(), "/foo", "/foo/topics/whatever/5.7-some-build") params = MbtParams(test_config(), dc) params.add_installation_arg() with pytest.raises(SystemExit): params.parse([])
def test_required_installation_long_succeeds(): dc = DirectoryContext(test_config(), "/foo", "/foo/topics/whatever/5.7-some-build") params = MbtParams(test_config(), dc) params.add_installation_arg() assert params.parse(["--installation", "some"]).installation == "some"
def test_installation_implies_everything_else(): dc = DirectoryContext(test_config(), "/foo", "/foo") params = MbtParams(test_config(), dc) params.add_installation_arg() with pytest.raises(SystemExit): params.parse(["-i", "some-tag"])
def test_installation(): dc = DirectoryContext(test_config(), "/foo", "/foo/topics/whatever/5.7-some-build-inst-some") params = MbtParams(test_config(), dc) params.add_installation_arg() assert params.parse([]).installation == "some"