Example #1
0
def test_spec_validation_pass(qc_spec: QCOptions):
    """
    Make sure we can correctly validate a specification.
    """
    if qc_spec.program.lower() not in qcengine.list_available_programs():
        pytest.skip(f"{qc_spec.program} missing skipping test")
        qc_spec.validate_specification()
Example #2
0
def test_td_psi4_validate():
    """
    Make sure validation fails in psi4 if we try and do a td calculation as geometry optimization does not work yet.
    """
    spec = QCOptions(
        program="psi4",
        method="td-cam-b3lyp",
        basis="6-31+G*",
        td_settings=TDSettings(n_states=3, use_tda=False),
    )
    with pytest.raises(SpecificationError):
        spec.validate_specification()
Example #3
0
def test_spec_validation_fail(qc_spec: QCOptions):
    """
    Make sure than an invalid specification raises an error.
    """
    with pytest.raises(SpecificationError):
        qc_spec.validate_specification()