コード例 #1
0
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([])
コード例 #2
0
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"
コード例 #3
0
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"])
コード例 #4
0
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"