Skip to content

Commit

Permalink
PR followup
Browse files Browse the repository at this point in the history
Added tests, incremented version, and added the author of the PR to the AUTHORS file
  • Loading branch information
jiaaro committed Jan 10, 2016
1 parent bc28b26 commit 5b917eb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ Johan Lövgren
github: dashj

Joachim Krüger
github: jkrgr
github: jkrgr

Shichao An:
github: shichao-an
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='pydub',
version='0.16.1',
version='0.16.2',
author='James Robert',
author_email='jiaaro@gmail.com',
description='Manipulate audio with an simple and easy high level interface',
Expand Down
7 changes: 7 additions & 0 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ def assertWithinTolerance(self, val, expected, tolerance=None,
upper_bound = val + tolerance
self.assertWithinRange(val, lower_bound, upper_bound)

def test_direct_instantiation_with_bytes(self):
seg = AudioSegment(b'RIFF\x28\x00\x00\x00WAVEfmt \x10\x00\x00\x00\x01\x00\x02\x00\x00}\x00\x00\x00\xf4\x01\x00\x04\x00\x10\x00data\x04\x00\x00\x00\x00\x00\x00\x00')
self.assertEqual(seg.frame_count(), 1)
self.assertEqual(seg.channels, 2)
self.assertEqual(seg.sample_width, 2)
self.assertEqual(seg.frame_rate, 32000)

def test_concat(self):
catted_audio = self.seg1 + self.seg2

Expand Down

0 comments on commit 5b917eb

Please sign in to comment.