Skip to content

Commit

Permalink
fix new test that used helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Feb 27, 2024
1 parent dd5ca6c commit db99b6d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions asdf/_tests/test_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import asdf
from asdf import tagged, treeutil, yamlutil
from asdf.exceptions import AsdfConversionWarning, AsdfWarning
from asdf.testing.helpers import yaml_to_asdf


def _roundtrip(obj):
Expand Down Expand Up @@ -334,15 +335,12 @@ class MyNDArray(np.ndarray):
],
)
def test_invalid_omap(payload):
test_yaml = f"""#ASDF {asdf.versioning.default_version}
%YAML 1.1
--- !<tag:stsci.edu:asdf/core/asdf-1.1.0>
od: !!omap
test_yaml = f"""od: !!omap
{payload}
..."""
"""

# Check that fully qualified explicit tags work
buff = helpers.yaml_to_asdf(test_yaml, yaml_headers=False)
buff = yaml_to_asdf(test_yaml)

with pytest.raises(yaml.constructor.ConstructorError):
with asdf.open(buff) as ff:
Expand Down

0 comments on commit db99b6d

Please sign in to comment.