[issue18919] Unify audio modules tests

2013-10-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you David. Fixed in issue19276.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-16 Thread R. David Murray

R. David Murray added the comment:

It looks like test_wave is still failing on PPC64 PowerLinux:

http://buildbot.python.org/all/builders/PPC64%20PowerLinux%203.x/builds/850/steps/test/logs/stdio

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-14 Thread koobs

koobs added the comment:

Tests fail for 2.7 on the koobs-freebsd9 and koobs-freebsd10 buildbots since 
a9f967c8d002db364021a5fb1c9926a27029e849

Taking a snapshot of the output here for reference:

test_aifc
test test_aifc produced unexpected output:
**
Warning: bad COMM chunk size
Warning: bad COMM chunk size
Warning: MARK chunk contains only 0 markers instead of 1

**

snip

363 tests OK.
1 test failed:
test_aifc

snip

Re-running failed tests in verbose mode
Re-running test 'test_aifc' in verbose mode

snip

test_read_comm_kludge_compname_even (test.test_aifc.AIFCLowLevelTest) ... 
Warning: bad COMM chunk size
ok
test_read_comm_kludge_compname_odd (test.test_aifc.AIFCLowLevelTest) ... 
Warning: bad COMM chunk size
ok
test_read_wrong_marks (test.test_aifc.AIFCLowLevelTest) ... Warning: MARK chunk 
contains only 0 markers instead of 1
ok

--
Ran 80 tests in 0.102s

OK

--
nosy: +koobs

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage: committed/rejected - patch review
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Is unexpected output considered as test failing? The aifc module uses bare 
print to output these warnings to stdout. Here is a patch which uses 
captured_stdout().

--
Added file: http://bugs.python.org/file32109/test_aifc_capture_warnings.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-14 Thread R. David Murray

R. David Murray added the comment:

In 2.7 unexpected output is a test failure, yes.

In 3.x we removed that check.  But I wonder if that was wise :)  (We did it for 
technical reasons when adding other features to regrtest).

Yes, using captured_stdout and checking for the expected warnings would be a 
better test, IMO.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-14 Thread Georg Brandl

Georg Brandl added the comment:

Some new (I assume) ResourceWarnings from test_wave:

/home/gbr/devel/python/Lib/unittest/case.py:571: ResourceWarning: unclosed file 
_io.BufferedWriter name='@test_1974_tmp'
  testMethod()
/home/gbr/devel/python/Lib/chunk.py:61: ResourceWarning: unclosed file 
_io.FileIO name='/home/gbr/devel/python/Lib/test/audiodata/pluck-pcm16.wav' 
mode='rb'
  self.chunkname = file.read(4)
/home/gbr/devel/python/Lib/chunk.py:61: ResourceWarning: unclosed file 
_io.FileIO name='/home/gbr/devel/python/Lib/test/audiodata/pluck-pcm24.wav' 
mode='rb'
  self.chunkname = file.read(4)
/home/gbr/devel/python/Lib/chunk.py:61: ResourceWarning: unclosed file 
_io.FileIO name='/home/gbr/devel/python/Lib/test/audiodata/pluck-pcm32.wav' 
mode='rb'
  self.chunkname = file.read(4)
/home/gbr/devel/python/Lib/chunk.py:61: ResourceWarning: unclosed file 
_io.FileIO name='/home/gbr/devel/python/Lib/test/audiodata/pluck-pcm8.wav' 
mode='rb'
  self.chunkname = file.read(4)

--
nosy: +georg.brandl

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 164a60cce934 by Serhiy Storchaka in branch '2.7':
Issue #18919: Catch and check warnings in the aifc module tests.
http://hg.python.org/cpython/rev/164a60cce934

New changeset 9eecd00ffc28 by Serhiy Storchaka in branch '3.3':
Issue #18919: Check warnings messages in the aifc module tests.
http://hg.python.org/cpython/rev/9eecd00ffc28

New changeset d168f094d16d by Serhiy Storchaka in branch 'default':
Issue #18919: Check warnings messages in the aifc module tests.
http://hg.python.org/cpython/rev/d168f094d16d

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fd7752db1e54 by Serhiy Storchaka in branch '2.7':
Issue #18919: Fixed resource leaks in audio tests.
http://hg.python.org/cpython/rev/fd7752db1e54

New changeset 2850fc02f324 by Serhiy Storchaka in branch '3.3':
Issue #18919: Fixed resource leaks in audio tests.
http://hg.python.org/cpython/rev/2850fc02f324

New changeset 835c6ea487b1 by Serhiy Storchaka in branch 'default':
Issue #18919: Fixed resource leaks in audio tests.
http://hg.python.org/cpython/rev/835c6ea487b1

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 In 3.x we removed that check.  But I wonder if that was wise :)  (We did it 
 for technical reasons when adding other features to regrtest).

Actually the checks left, but there was no check for warning message. Now they 
are added.

 Some new (I assume) ResourceWarnings from test_wave:

Thank you Greg for this report. Yes, these warnings are new. The tests only 
existed for the aifc module (which always closes externally opened file), and 
when I extended it to other modules I forgot close externally opened files. 
Hope it now fixed.

--
stage: patch review - committed/rejected

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-14 Thread Ned Deily

Ned Deily added the comment:

The new tests fail when run from an installed Python.  You also need to add all 
of the new test directories to LIBSUBDIRS for the libinstall target in 
Makefile.pre.in.

--
nosy: +ned.deily

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset de1f62a55648 by Serhiy Storchaka in branch '2.7':
Issue #18919: Add test/audiodata to LIBSUBDIRS.
http://hg.python.org/cpython/rev/de1f62a55648

New changeset 865bab7387f2 by Serhiy Storchaka in branch '3.3':
Issue #18919: Add test/audiodata to LIBSUBDIRS.
http://hg.python.org/cpython/rev/865bab7387f2

New changeset 4d5143ff58ea by Serhiy Storchaka in branch 'default':
Issue #18919: Add test/audiodata to LIBSUBDIRS.
http://hg.python.org/cpython/rev/4d5143ff58ea

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a9f967c8d002 by Serhiy Storchaka in branch '2.7':
Issue #18919: Added tests for the sunau module.  Unified and extended tests
http://hg.python.org/cpython/rev/a9f967c8d002

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ee7563b07c6f by Serhiy Storchaka in branch '3.3':
Issue #18919: Unified and extended tests for audio modules: aifc, sunau and
http://hg.python.org/cpython/rev/ee7563b07c6f

New changeset fc418ecd8777 by Serhiy Storchaka in branch 'default':
Issue #18919: Unified and extended tests for audio modules: aifc, sunau and
http://hg.python.org/cpython/rev/fc418ecd8777

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-10-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3303d735058f by Serhiy Storchaka in branch '2.7':
Issue #18919: If the close() method of a writer in the sunau or wave module
http://hg.python.org/cpython/rev/3303d735058f

New changeset b7eae747385c by Serhiy Storchaka in branch '3.3':
Issue #18919: If the close() method of a writer in the sunau or wave module
http://hg.python.org/cpython/rev/b7eae747385c

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-09-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated. Now files created in external program (Audacity) are used for 
testing. This exposed yet one bug, in the aifc module (issue19131).

--
dependencies: +Broken support of compressed AIFC files
Added file: http://bugs.python.org/file31911/audiotests_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-09-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Added file: http://bugs.python.org/file31912/makeaudiotests.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-09-06 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +Miscellaneous fixes for the sunau module

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-09-06 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Added file: http://bugs.python.org/file31632/audiotests_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-09-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated. It now contains tests for all supported encoding formats 
(PCM8-32, u-Law, A-Law).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-09-04 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Three audio modules, aifc, sunau and wave, have similar interfaces and poor 
tests. The proposed patch introduces new file Lib/test/audiotests.py with 
common audio tests.

New testing exposes some bugs and discrepancy between different audio modules. 
For example aifc uses bytes for compression type and name, while sunau and wave 
use strings (issue8934). aifc closes underlied file object on close(), while 
sunau and wave don't. wave rounds a framerate, while aifc and sunau truncate 
it. Different modules have different behaviors when process framedata with 
length which is not divisible by frame size.

--
assignee: serhiy.storchaka
components: Tests
files: audiotests.patch
keywords: patch
messages: 196900
nosy: Claudiu.Popa, r.david.murray, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Unify audio modules tests
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31584/audiotests.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-09-04 Thread Claudiu.Popa

Claudiu.Popa added the comment:

I love this idea! I was thinking while working on sunau/aifc/wave patches that 
we can do more than this, unify the entire audio modules,
getting rid of Aifc_write/read and Wave_write/read was in fact my first desire.
 One way that I thought about was to provide an abc and each module would 
implement that interface.
That way we could create new modules for audio operations for other formats as 
well. If this sounds like a good idea, I could try to provide a patch for this.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-09-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 61ca4732399b by Serhiy Storchaka in branch 'default':
Issues #18901, #18919: Fix a typo in the _sunau_params name.
http://hg.python.org/cpython/rev/61ca4732399b

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18919] Unify audio modules tests

2013-09-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
dependencies: +Add support of the 'with' statement to sunau.open.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18919
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com