From 5f4d654672c52bd010bc1cc6b602679fe145def0 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 15 Oct 2024 16:50:31 +0200 Subject: [PATCH] minor test update: Use new name for CCSDS file seq counter --- tests/test_seq_cnt_provider.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_seq_cnt_provider.py b/tests/test_seq_cnt_provider.py index a1f7113..6f39bd8 100644 --- a/tests/test_seq_cnt_provider.py +++ b/tests/test_seq_cnt_provider.py @@ -3,7 +3,7 @@ import platform from unittest import TestCase -from spacepackets.seqcount import PusFileSeqCountProvider +from spacepackets.seqcount import CcsdsFileSeqCountProvider from tempfile import NamedTemporaryFile @@ -16,7 +16,7 @@ def test_basic(self): with NamedTemporaryFile("w+t") as file: file.write("0\n") file.seek(0) - seq_cnt_provider = PusFileSeqCountProvider(Path(file.name)) + seq_cnt_provider = CcsdsFileSeqCountProvider(Path(file.name)) seq_cnt = seq_cnt_provider.current() self.assertEqual(seq_cnt, 0) # The first call will start at 0 @@ -30,14 +30,14 @@ def test_basic(self): self.assertEqual(next(seq_cnt_provider), 0) def test_with_real_file(self): - seq_cnt_provider = PusFileSeqCountProvider(self.file_name) + seq_cnt_provider = CcsdsFileSeqCountProvider(self.file_name) self.assertTrue(self.file_name.exists()) self.assertEqual(seq_cnt_provider.current(), 0) self.assertEqual(next(seq_cnt_provider), 0) pass def test_file_deleted_runtime(self): - seq_cnt_provider = PusFileSeqCountProvider(self.file_name) + seq_cnt_provider = CcsdsFileSeqCountProvider(self.file_name) self.assertTrue(self.file_name.exists()) os.remove(self.file_name) with self.assertRaises(FileNotFoundError): @@ -50,13 +50,13 @@ def test_faulty_file_entry(self): with NamedTemporaryFile("w+t") as file: file.write("-1\n") file.seek(0) - seq_cnt_provider = PusFileSeqCountProvider(Path(file.name)) + seq_cnt_provider = CcsdsFileSeqCountProvider(Path(file.name)) with self.assertRaises(ValueError): next(seq_cnt_provider) file.write(f"{pow(2, 15)}\n") file.seek(0) file.flush() - seq_cnt_provider = PusFileSeqCountProvider(Path(file.name)) + seq_cnt_provider = CcsdsFileSeqCountProvider(Path(file.name)) with self.assertRaises(ValueError): next(seq_cnt_provider)