Skip to content
Snippets Groups Projects
Commit a57851aa authored by Jay's avatar Jay
Browse files

Fixes MRO serial issue

parent e2fbdf2e
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -82,6 +82,7 @@ def generate_serial_number(label):
# Sort the keys to ensure proper iteration order
keys = sorted(translation.keys())
for k in keys:
try:
group = translation[k]
......
import os
import sys
import unittest
from plio.examples import get_path
sys.path.insert(0, os.path.abspath('..'))
import pytest
from plio.io import isis_serial_number
from plio.examples import get_path
@pytest.fixture
def apollo_lbl():
return get_path('Test_PVL.lbl')
@pytest.fixture
def ctx_lbl():
return get_path('ctx.pvl')
class TestIsisSerials(unittest.TestCase):
@pytest.mark.parametrize("label, expected", [(apollo_lbl(), 'APOLLO15/METRIC/1971-07-31T14:02:27.179'),
(ctx_lbl(),'MRO/CTX/0906095311:038')
])
def test_generate_serial_number(label, expected):
serial = isis_serial_number.generate_serial_number(label)
assert serial == expected
def test_generate_serial_number(self):
label = get_path('Test_PVL.lbl')
serial = isis_serial_number.generate_serial_number(label)
self.assertEqual('APOLLO15/METRIC/1971-07-31T14:02:27.179', serial)
\ No newline at end of file
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment