Skip to content

Commit

Permalink
fix: update xanadu tests to use with pytest.raise (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbeCoull authored Sep 23, 2024
1 parent 6de44e9 commit 65a7bb3
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ def test_valid(valid_input):
assert result.braketSchemaHeader.name == "braket.device_schema.xanadu.xanadu_device_parameters"


@pytest.mark.xfail(raises=ValidationError)
def test__missing_schemaHeader(valid_input):
def test_missing_schemaHeader(valid_input):
valid_input.pop("braketSchemaHeader")
XanaduDeviceParameters.parse_raw_schema(json.dumps(valid_input))
with pytest.raises(ValidationError):
XanaduDeviceParameters.parse_raw_schema(json.dumps(valid_input))


@pytest.mark.xfail(raises=ValidationError)
def test__missing_paradigmProperties(valid_input):
def test_missing_paradigmProperties(valid_input):
valid_input.pop("paradigmParameters")
XanaduDeviceParameters.parse_raw_schema(json.dumps(valid_input))
with pytest.raises(ValidationError):
XanaduDeviceParameters.parse_raw_schema(json.dumps(valid_input))

0 comments on commit 65a7bb3

Please sign in to comment.