File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -778,7 +778,15 @@ def test_info_with_custom_extension(capsys):
778
778
---
779
779
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
780
780
id: { MY_SCHEMA_URI }
781
- title: sentinel""" .encode (
781
+ title: top_title
782
+ properties:
783
+ foo:
784
+ title: foo_title
785
+ type: object
786
+ properties:
787
+ bar:
788
+ title: bar_title
789
+ """ .encode (
782
790
"ascii"
783
791
)
784
792
@@ -791,11 +799,15 @@ class MyExtension:
791
799
)
792
800
]
793
801
802
+ class FooThing :
803
+ def __asdf_traverse__ (self ):
804
+ return {"bar" : 1 }
805
+
794
806
class Thing :
795
807
_tag = MY_TAG_URI
796
808
797
809
def __asdf_traverse__ (self ):
798
- return []
810
+ return { "foo" : FooThing ()}
799
811
800
812
with asdf .config_context () as cfg :
801
813
cfg .add_resource_mapping ({MY_SCHEMA_URI : schema_bytes })
@@ -804,7 +816,9 @@ def __asdf_traverse__(self):
804
816
af .info (max_cols = None )
805
817
806
818
captured = capsys .readouterr ()
807
- assert "sentinel" in captured .out
819
+ assert "top_title" in captured .out
820
+ assert "foo_title" in captured .out
821
+ assert "bar_title" in captured .out
808
822
809
823
810
824
def test_info_no_infinite_loop (capsys ):
You can’t perform that action at this time.
0 commit comments