Skip to content

Commit

Permalink
test MivotViewer.to_dict() output
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichel committed Dec 2, 2024
1 parent e9e273e commit 28ee3ed
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
32 changes: 16 additions & 16 deletions pyvo/mivot/tests/data/reference/test_mivot_writer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dmtype": "EpochPosition",
"dmtype": "mango:EpochPosition",
"longitude": {
"value": 52.2340018,
"unit": "deg"
Expand All @@ -8,12 +8,12 @@
"value": 59.8937333,
"unit": "deg"
},
"EpochPosition_errors": {
"dmtype": "EpochPositionErrors",
"dmrole": "errors",
"EpochPositionErrors_position": {
"dmtype": "ErrorCorrMatrix",
"dmrole": "position",
"errors": {
"dmtype": "mango:EpochPositionErrors",
"dmrole": "mango:EpochPosition.errors",
"position": {
"dmtype": "mango:error.ErrorCorrMatrix",
"dmrole": "mango:EpochPositionErrors.position",
"sigma1": {
"value": 6.0,
"unit": "arcsec"
Expand All @@ -24,19 +24,19 @@
}
}
},
"EpochPosition_spaceSys": {
"dmtype": "SpaceSys",
"spaceSys": {
"dmtype": "coords:SpaceSys",
"dmid": "_spacesys_icrs",
"dmrole": "spaceSys",
"PhysicalCoordSys_frame": {
"dmtype": "SpaceFrame",
"dmrole": "frame",
"dmrole": "mango:EpochPosition.spaceSys",
"frame": {
"dmtype": "coords:SpaceFrame",
"dmrole": "coords:PhysicalCoordSys.frame",
"spaceRefFrame": {
"value": "ICRS"
},
"SpaceFrame_refPosition": {
"dmtype": "StdRefLocation",
"dmrole": "refPosition",
"refPosition": {
"dmtype": "coords:StdRefLocation",
"dmrole": "coords:SpaceFrame.refPosition",
"position": {
"value": "BARYCENTER"
}
Expand Down
5 changes: 4 additions & 1 deletion pyvo/mivot/tests/test_mivot_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ def test_MivotInstanceAll():

mv = MivotViewer(votable)
print(mv.dm_instance)
assert mv.dm_instance.to_dict == DictUtils.read_dict_from_file(
assert mv.dm_instance.to_dict() == DictUtils.read_dict_from_file(
os.path.join(data_path, "reference/test_mivot_writer.json")
)
votable.to_xml(data_path + "/essai.xml")

if __name__ == "__main__":
test_MivotInstanceAll()

0 comments on commit 28ee3ed

Please sign in to comment.