示例#1
0
def test_check_before_phase_error(install_mockery):
    pkg = spack.repo.get('trivial-install-test-package')
    pkg.stop_before_phase = 'beforephase'
    with pytest.raises(inst.BadInstallPhase) as exc_info:
        inst._check_last_phase(pkg)

    err = str(exc_info.value)
    assert 'is not a valid phase' in err
    assert pkg.stop_before_phase in err
示例#2
0
def test_check_before_phase_error(install_mockery):
    s = spack.spec.Spec('trivial-install-test-package').concretized()
    s.package.stop_before_phase = 'beforephase'
    with pytest.raises(inst.BadInstallPhase) as exc_info:
        inst._check_last_phase(s.package)

    err = str(exc_info.value)
    assert 'is not a valid phase' in err
    assert s.package.stop_before_phase in err