Skip to content

Commit

Permalink
fix: tweak test_flatten_signal to test for empty arrays pre-flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
Radascript committed May 17, 2022
1 parent e744a7c commit a7c0da4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_emgdecompy.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ def test_flatten_signal():
q = flat.shape[1]

# test that inner arrays are correct length
assert i[0][0].shape[1] == q, "Dimensions of inner array not the same."
# test that inner arrays are correct length
if 0 not in i[0][0].shape:
assert i[0][0].shape[1] == q, "Dimensions of inner array not the same."
else:
assert i[0][1].shape[1] == q, "Dimensions of inner array not the same."

# test that empty channel has been removed
assert (m * n) != flat.shape[0], "Empty array not removed"
Expand Down

0 comments on commit a7c0da4

Please sign in to comment.