Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
bengineerd committed Sep 30, 2024
1 parent 59ed565 commit b13c62c
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions tests/test_list_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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

Expand Down

0 comments on commit b13c62c

Please sign in to comment.