Skip to content

Commit 5b917eb

Browse files
committed
PR followup
Added tests, incremented version, and added the author of the PR to the AUTHORS file
1 parent bc28b26 commit 5b917eb

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

Diff for: AUTHORS

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,7 @@ Johan Lövgren
3838
github: dashj
3939

4040
Joachim Krüger
41-
github: jkrgr
41+
github: jkrgr
42+
43+
Shichao An:
44+
github: shichao-an

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setup(
1010
name='pydub',
11-
version='0.16.1',
11+
version='0.16.2',
1212
author='James Robert',
1313
author_email='[email protected]',
1414
description='Manipulate audio with an simple and easy high level interface',

Diff for: test/test.py

+7
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ def assertWithinTolerance(self, val, expected, tolerance=None,
101101
upper_bound = val + tolerance
102102
self.assertWithinRange(val, lower_bound, upper_bound)
103103

104+
def test_direct_instantiation_with_bytes(self):
105+
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')
106+
self.assertEqual(seg.frame_count(), 1)
107+
self.assertEqual(seg.channels, 2)
108+
self.assertEqual(seg.sample_width, 2)
109+
self.assertEqual(seg.frame_rate, 32000)
110+
104111
def test_concat(self):
105112
catted_audio = self.seg1 + self.seg2
106113

0 commit comments

Comments
 (0)