Skip to content

Commit 2f3e87e

Browse files
committed
fix test
1 parent 0d69087 commit 2f3e87e

1 file changed

Lines changed: 0 additions & 44 deletions

File tree

imap_processing/tests/ultra/unit/test_decom_apid_882.py

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import pandas as pd
55
import pytest
66

7-
from imap_processing import imap_module_directory
87
from imap_processing.ultra.l0.ultra_utils import ENERGY_RATES_KEYS, ULTRA_ENERGY_RATES
98

109

@@ -49,46 +48,3 @@ def test_image_rate_decom(decom_test_data, energy_rates_test_path):
4948
for name in ENERGY_RATES_KEYS:
5049
arr.append(decom_ultra[name][total_packets - 1])
5150
assert expected_arrn == arr
52-
53-
54-
@pytest.mark.parametrize(
55-
"decom_test_data",
56-
[
57-
pytest.param(
58-
{
59-
"apid": ULTRA_ENERGY_RATES.apid[0],
60-
"filename": "FM45_UltraFM45_Functional_2024-01-22T0105_"
61-
"20240122T010548.CCSDS",
62-
}
63-
)
64-
],
65-
indirect=True,
66-
)
67-
def test_image_rate_decom_zero_width(decom_test_data):
68-
"""This function tests for cases in which the width is zero within the packet."""
69-
test_path = (
70-
imap_module_directory
71-
/ "tests"
72-
/ "ultra"
73-
/ "data"
74-
/ "l0"
75-
/ "ultra45_raw_sc_ultraimgrates_20220530_00.csv"
76-
)
77-
78-
decom_ultra = decom_test_data
79-
80-
df = pd.read_csv(test_path, index_col="MET")
81-
total_packets = 163
82-
83-
np.testing.assert_array_equal(df.SID, decom_ultra["sid"])
84-
np.testing.assert_array_equal(df.Spin, decom_ultra["spin"])
85-
np.testing.assert_array_equal(df.AbortFlag, decom_ultra["abortflag"])
86-
np.testing.assert_array_equal(df.StartDelay, decom_ultra["startdelay"])
87-
88-
for i in range(total_packets):
89-
t = int(df["SequenceCount"].iloc[i]) # Ensure we get an integer value
90-
expected_arr = json.loads(df.loc[df["SequenceCount"] == t, "Counts"].values[0])
91-
arr = []
92-
for name in ENERGY_RATES_KEYS:
93-
arr.append(decom_ultra[name][i])
94-
assert expected_arr == arr

0 commit comments

Comments
 (0)