Skip to content

Commit

Permalink
test sample values against known data
Browse files Browse the repository at this point in the history
was previously testing against decoded mp3 data which can change slightly due to different mp3 codecs
  • Loading branch information
jiaaro committed Nov 5, 2015
1 parent cedb32b commit 4d634dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,10 @@ def test_array_type(self):
self.assertEqual(silence.set_sample_width(4).array_type, "i")

def test_sample_array(self):
samples = self.seg1[500].get_array_of_samples()
samples = Sine(450).to_audio_segment().get_array_of_samples()
self.assertEqual(
list(samples[:8]),
[335, -871, 143, -920, -59, -952, -274, -997]
[0, 2099, 4190, 6263, 8311, 10325, 12296, 14217]
)


Expand Down

0 comments on commit 4d634dd

Please sign in to comment.