Skip to content

Commit

Permalink
TST #1206 tuples & numpy arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Jul 31, 2024
1 parent a26fff0 commit 97607cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ophyd/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ def test_set_signal_to_None():
[[1, 2, 3, 0], [1, 2, 3], [], None, None, False], # len(a) > len(b)
[5, [1, 2, 3], [], None, None, False], # not the same type
[[1, 2, 3], 5, [], None, None, False], # not the same type
# numpy arrays
[[1, 2, 3], np.array([1, 2, 3]), [], None, None, True], # identical
[[1, 2, 3], np.array([1, 2, 3, 0]), [], None, None, True], # only compares len(a) items
# tuple
[(1, 2, 3), np.array([1, 2, 3]), [], None, None, True], # identical
# with tolerance
[[1, 2, 3.0], [1, 2, 3.12345], [], 0.01, None, False],
[[1, 2, 3.0], [1, 2, 3.12345], [], 0.2, None, True],
Expand Down

0 comments on commit 97607cf

Please sign in to comment.