From b13c62ca5c7956d975a321c9a70bd3e5a0ec3085 Mon Sep 17 00:00:00 2001 From: Benjamin Reese Date: Mon, 30 Sep 2024 14:38:41 -0700 Subject: [PATCH] Update test --- tests/test_list_memory.py | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/tests/test_list_memory.py b/tests/test_list_memory.py index a042d9926..576a6a0de 100644 --- a/tests/test_list_memory.py +++ b/tests/test_list_memory.py @@ -423,9 +423,6 @@ def test_memory(): root.ListDevice.UInt32List.set(UInt32ListA) root.ListDevice.Int32List.set(Int32ListA) - root.ListDevice.UInt32List.set(UInt32ListA[::2]) - root.ListDevice.Int32List.set(Int32ListA[::2]) - root.ListDevice.UInt32List.set(np.array([1,2,3],np.uint32),index=7) root.ListDevice.Int32List.set([1,-22,-33],index=5) @@ -447,6 +444,30 @@ def test_memory(): # Test value shift _ = resA[0] >> 5 + root.ListDevice.UInt32List.set(UInt32ListA[::2]) + root.ListDevice.Int32List.set(Int32ListA[::2]) + + resA = root.ListDevice.UInt32List.get() + resB = root.ListDevice.Int32List.get() + + for i in range(16): + + if resA[i] != UInt32ListA[::2][i]: + raise AssertionError(f'Stripe Verification Failure for UInt32ListA at position {i}') + + if resB[i] != Int32ListA[::2][i]: + raise AssertionError(f'Stripe Verification Failure for Int32ListA at position {i}') + + for i in range(16, 32): + + if resA[i] != UInt32ListA[i]: + raise AssertionError(f'Stripe Verification Failure for UInt32ListA at position {i}') + + if resB[i] != Int32ListA[i]: + raise AssertionError(f'Stripe Verification Failure for Int32ListA at position {i}') + + + def run_gui(): import pyrogue.pydm