Skip to content

Commit

Permalink
save NSID from list to dict test changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Slautin committed Aug 23, 2024
1 parent 5b706fe commit a826b2f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions tests/readers/SID/test_nsid_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ def test_nsid_bepfm_file(self):
data = reader.read()
assert len(data)==3, "Data should have been length 3 but was instead {}".format(len(data))
#Check to see if these are sidpy datasets
for ind in range(3):
assert type(data[ind])==sidpy.sid.dataset.Dataset, "Expected sidpy dataset but received {}".format(type(data[ind]))

assert data[0].shape==(3, 128, 128, 1)
assert data[1].shape == (128, 128, 61)
assert data[2].shape == (128,128,5)
for key in data:
assert type(data[key])==sidpy.sid.dataset.Dataset, "Expected sidpy dataset but received {}".format(type(data[ind]))

data_keys = list(data.keys())

assert data[data_keys[0]].shape==(3, 128, 128, 1)
assert data[data_keys[1]].shape == (128, 128, 61)
assert data[data_keys[2]].shape == (128,128,5)

assert len(data[0].original_metadata.keys())==285, "Expected 285 keys but received {} for data[0]"
assert len(data[1].original_metadata.keys())==285, "Expected 285 keys but received {} for data[1]"
assert len(data[2].original_metadata.keys())==0, "Expected 0 keys but received {} for data[2]"
assert len(data[data_keys[0]].original_metadata.keys())==285, "Expected 285 keys but received {} for data[0]"
assert len(data[data_keys[1]].original_metadata.keys())==285, "Expected 285 keys but received {} for data[1]"
assert len(data[data_keys[2]].original_metadata.keys())==0, "Expected 0 keys but received {} for data[2]"



Expand Down

0 comments on commit a826b2f

Please sign in to comment.