time-lapse-artifacts / tools /test_uniform_lettered_context.py
maxwellinked's picture
Stage joint real-time movement-inspection source cohort (#111)
08cff29
Raw History Blame
842 Bytes
"""Preserve registered single-letter recording slots in contextual names."""
import unittest
class LetteredContextTests(unittest.TestCase):
def test_context_preserves_digits_and_single_lowercase_letter(self):
from uniform_media_names import contextual_basename
for suffix in ('03','03a','03b'):
value = contextual_basename('2026-10-27','0100','RealTime','rt-example','1'*64,1,'.mp4',recording_path=f'Standard_Time_Lapses/example.Rec{suffix}.mp4')
self.assertIn(f'.RealTime.Rec{suffix}.',value)
for suffix in ('03ab','03A'):
value = contextual_basename('2026-10-27','0100','RealTime','rt-example','1'*64,1,'.mp4',recording_path=f'Standard_Time_Lapses/example.Rec{suffix}.mp4')
self.assertNotIn('.Rec',value)
if __name__ == '__main__': unittest.main()