Skip to content

Commit

Permalink
rcal-949 Update unit test for parsing visit_id
Browse files Browse the repository at this point in the history
  • Loading branch information
ddavis-stsci committed Nov 11, 2024
1 parent 05c23b5 commit f214883
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions romancal/associations/tests/test_skycell_asn.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pytest

# from romancal.associations import Association, AssociationRegistry, load_asn
import romancal.associations.skycell_asn as skycell_asn
from romancal.associations.skycell_asn import Main


Expand All @@ -16,3 +17,14 @@ def test_cmdline_fails():
# Only the association file argument
with pytest.raises(SystemExit):
Main(["-o", "test_asn.json"])

def test_parse_visitID():

filelist1 = ['r0000101002003004005_0001_wfi10_cal.asdf',]
visitid_parts = skycell_asn.parse_visitID(filelist1[0][1:20])
assert visitid_parts['Program'] == '00001'
assert visitid_parts['Execution'] == '01'
assert visitid_parts['Pass'] == '002'
assert visitid_parts['Segment'] == '003'
assert visitid_parts['Observation'] == '004'
assert visitid_parts['Visit'] == '005'

0 comments on commit f214883

Please sign in to comment.