Skip to content

Commit

Permalink
Add test case for unsorted index
Browse files Browse the repository at this point in the history
  • Loading branch information
audeerington committed Jul 4, 2024
1 parent aa87c89 commit 854acea
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,29 @@
np.ones((1, 1)),
),
),
# Unsorted index
(
audformat.segmented_index(
["f1.wav", "f2.wav", "f1.wav", "f2.wav"],
[0.2, 0.0, 0.0, 0.3],
[1.0, 0.3, 0.2, 1.0],
),
np.zeros((1, 10)),
10,
auglib.transform.Function(lambda x, _: x + 1),
True,
audformat.segmented_index(
["f1-0.wav", "f2-0.wav", "f1-1.wav", "f2-1.wav"],
[0, 0, 0, 0],
[0.8, 0.3, 0.2, 0.7],
),
(
np.ones((1, 8)),
np.ones((1, 3)),
np.ones((1, 2)),
np.ones((1, 7)),
),
),
],
)
def test_augment(
Expand Down

0 comments on commit 854acea

Please sign in to comment.