def test_wavefunction_output(version, testfile, request): example = test_helpers.get_test(testfile) # temporary - dev:=2 doesn't pass, but dev:=qcel will if version == "dev" and ("water_output" in request.node.name): pytest.skip() # by chance, this validates with v1 instead of triggering pytest.raises below, so skip if version == 1 and ("water_output_v3" in request.node.name): pytest.skip() # a proper failure, where schema is not back-compatible, so xfail if version == "dev" and ("water_output]" in request.node.name): with pytest.raises(jsonschema.exceptions.ValidationError) as e: qcschema.validate(example, "output", version=version) assert "'restricted' is a required property" in str(e.value) pytest.xfail() # ordinary operation if isinstance(version, int) and version < example["schema_version"]: with pytest.raises(jsonschema.exceptions.ValidationError): qcschema.validate(example, "output", version=version) else: qcschema.validate(example, "output", version=version)
def test_simple_basis_input(version, testfile): example = test_helpers.get_test(testfile) if isinstance(version, int) and version < example["schema_version"]: with pytest.raises(jsonschema.exceptions.ValidationError): qcschema.validate(example, "input", version=version) else: qcschema.validate(example, "input", version=version)
def test_output_failures(version, testfile): example = test_helpers.get_test(testfile) with pytest.raises(jsonschema.exceptions.ValidationError): qcschema.validate(example, "output")
def test_simple_basis_input(version, testfile): example = test_helpers.get_test(testfile) qcschema.validate(example, "input")
def test_wavefunction_output(version, testfile): example = test_helpers.get_test(testfile) qcschema.validate(example, "output")