Skip to content

Commit

Permalink
samples
Browse files Browse the repository at this point in the history
  • Loading branch information
jordimas committed Jan 17, 2025
1 parent e1e6fdb commit eb2727a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/pydub_audio_segment_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,11 @@ def test_get_array_of_samples(self):
samples = silent_seg.get_array_of_samples()
assert 11025 == len(samples)
assert all(sample == 0 for sample in samples)

def test_get_array_of_len(self):
silent_seg = AudioSegment.silent(
duration=1000
) # Create a 1-second silent AudioSegment

samples = len(silent_seg)
assert 1000 == samples

0 comments on commit eb2727a

Please sign in to comment.