
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2013-09-04 11:11 byserhiy.storchaka, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| audiotests.patch | serhiy.storchaka,2013-09-04 11:11 | review | ||
| audiotests_2.patch | serhiy.storchaka,2013-09-06 21:29 | review | ||
| audiotests_3.patch | serhiy.storchaka,2013-09-29 19:30 | review | ||
| makeaudiotests.py | serhiy.storchaka,2013-09-29 19:36 | Helper script for generating testing data from testing files | ||
| test_aifc_capture_warnings.patch | serhiy.storchaka,2013-10-14 08:58 | review | ||
| Messages (19) | |||
|---|---|---|---|
| msg196900 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2013-09-04 11:11 | |
Three audio modules, aifc, sunau and wave, have similar interfaces and poor tests. The proposed patch introduces new fileLib/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. | |||
| msg196901 -(view) | Author: PCManticore (Claudiu.Popa)*![]() | Date: 2013-09-04 11:16 | |
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. | |||
| msg196903 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2013-09-04 11:30 | |
New changeset61ca4732399b by Serhiy Storchaka in branch 'default':Issues#18901,#18919: Fix a typo in the _sunau_params name.http://hg.python.org/cpython/rev/61ca4732399b | |||
| msg197106 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2013-09-06 21:02 | |
Patch updated. It now contains tests for all supported encoding formats (PCM8-32, u-Law, A-Law). | |||
| msg198632 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2013-09-29 19:30 | |
Patch updated. Now files created in external program (Audacity) are used for testing. This exposed yet one bug, in the aifc module (issue19131). | |||
| msg199611 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2013-10-12 18:39 | |
New changeset3303d735058f by Serhiy Storchaka in branch '2.7':Issue#18919: If the close() method of a writer in the sunau or wave modulehttp://hg.python.org/cpython/rev/3303d735058fNew changesetb7eae747385c by Serhiy Storchaka in branch '3.3':Issue#18919: If the close() method of a writer in the sunau or wave modulehttp://hg.python.org/cpython/rev/b7eae747385c | |||
| msg199712 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2013-10-13 14:52 | |
New changeseta9f967c8d002 by Serhiy Storchaka in branch '2.7':Issue#18919: Added tests for the sunau module. Unified and extended testshttp://hg.python.org/cpython/rev/a9f967c8d002 | |||
| msg199720 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2013-10-13 15:14 | |
New changesetee7563b07c6f by Serhiy Storchaka in branch '3.3':Issue#18919: Unified and extended tests for audio modules: aifc, sunau andhttp://hg.python.org/cpython/rev/ee7563b07c6fNew changesetfc418ecd8777 by Serhiy Storchaka in branch 'default':Issue#18919: Unified and extended tests for audio modules: aifc, sunau andhttp://hg.python.org/cpython/rev/fc418ecd8777 | |||
| msg199851 -(view) | Author: Kubilay Kocak (koobs)![]() | Date: 2013-10-14 08:18 | |
Tests fail for 2.7 on the koobs-freebsd9 and koobs-freebsd10 buildbots sincea9f967c8d002db364021a5fb1c9926a27029e849Taking a snapshot of the output here for reference:test_aifctest test_aifc produced unexpected output:**********************************************************************Warning: bad COMM chunk sizeWarning: bad COMM chunk sizeWarning: 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 modeRe-running test 'test_aifc' in verbose mode<snip>test_read_comm_kludge_compname_even (test.test_aifc.AIFCLowLevelTest) ... Warning: bad COMM chunk sizeoktest_read_comm_kludge_compname_odd (test.test_aifc.AIFCLowLevelTest) ... Warning: bad COMM chunk sizeoktest_read_wrong_marks (test.test_aifc.AIFCLowLevelTest) ... Warning: MARK chunk contains only 0 markers instead of 1ok----------------------------------------------------------------------Ran 80 tests in 0.102sOK | |||
| msg199854 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2013-10-14 08:58 | |
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(). | |||
| msg199912 -(view) | Author: R. David Murray (r.david.murray)*![]() | Date: 2013-10-14 15:48 | |
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. | |||
| msg199921 -(view) | Author: Georg Brandl (georg.brandl)*![]() | Date: 2013-10-14 16:13 | |
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) | |||
| msg199926 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2013-10-14 17:06 | |
New changeset164a60cce934 by Serhiy Storchaka in branch '2.7':Issue#18919: Catch and check warnings in the aifc module tests.http://hg.python.org/cpython/rev/164a60cce934New changeset9eecd00ffc28 by Serhiy Storchaka in branch '3.3':Issue#18919: Check warnings messages in the aifc module tests.http://hg.python.org/cpython/rev/9eecd00ffc28New changesetd168f094d16d by Serhiy Storchaka in branch 'default':Issue#18919: Check warnings messages in the aifc module tests.http://hg.python.org/cpython/rev/d168f094d16d | |||
| msg199927 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2013-10-14 17:11 | |
New changesetfd7752db1e54 by Serhiy Storchaka in branch '2.7':Issue#18919: Fixed resource leaks in audio tests.http://hg.python.org/cpython/rev/fd7752db1e54New changeset2850fc02f324 by Serhiy Storchaka in branch '3.3':Issue#18919: Fixed resource leaks in audio tests.http://hg.python.org/cpython/rev/2850fc02f324New changeset835c6ea487b1 by Serhiy Storchaka in branch 'default':Issue#18919: Fixed resource leaks in audio tests.http://hg.python.org/cpython/rev/835c6ea487b1 | |||
| msg199928 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2013-10-14 17:16 | |
> 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. | |||
| msg199932 -(view) | Author: Ned Deily (ned.deily)*![]() | Date: 2013-10-14 17:40 | |
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. | |||
| msg199938 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2013-10-14 18:20 | |
New changesetde1f62a55648 by Serhiy Storchaka in branch '2.7':Issue#18919: Add test/audiodata to LIBSUBDIRS.http://hg.python.org/cpython/rev/de1f62a55648New changeset865bab7387f2 by Serhiy Storchaka in branch '3.3':Issue#18919: Add test/audiodata to LIBSUBDIRS.http://hg.python.org/cpython/rev/865bab7387f2New changeset4d5143ff58ea by Serhiy Storchaka in branch 'default':Issue#18919: Add test/audiodata to LIBSUBDIRS.http://hg.python.org/cpython/rev/4d5143ff58ea | |||
| msg200103 -(view) | Author: R. David Murray (r.david.murray)*![]() | Date: 2013-10-17 02:39 | |
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 | |||
| msg200174 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2013-10-17 23:04 | |
Thank you David. Fixed inissue19276. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:50 | admin | set | github: 63119 |
| 2013-10-17 23:04:11 | serhiy.storchaka | set | messages: +msg200174 |
| 2013-10-17 02:39:47 | r.david.murray | set | messages: +msg200103 |
| 2013-10-14 21:36:31 | serhiy.storchaka | set | status: open -> closed |
| 2013-10-14 18:20:16 | python-dev | set | messages: +msg199938 |
| 2013-10-14 17:40:09 | ned.deily | set | nosy: +ned.deily messages: +msg199932 |
| 2013-10-14 17:16:52 | serhiy.storchaka | set | messages: +msg199928 stage: patch review -> resolved |
| 2013-10-14 17:11:02 | python-dev | set | messages: +msg199927 |
| 2013-10-14 17:06:34 | python-dev | set | messages: +msg199926 |
| 2013-10-14 16:13:03 | georg.brandl | set | nosy: +georg.brandl messages: +msg199921 |
| 2013-10-14 15:48:20 | r.david.murray | set | messages: +msg199912 |
| 2013-10-14 08:59:00 | serhiy.storchaka | set | status: closed -> open stage: resolved -> patch review |
| 2013-10-14 08:58:38 | serhiy.storchaka | set | files: +test_aifc_capture_warnings.patch messages: +msg199854 |
| 2013-10-14 08:18:39 | koobs | set | nosy: +koobs messages: +msg199851 |
| 2013-10-13 15:16:13 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2013-10-13 15:14:35 | python-dev | set | messages: +msg199720 |
| 2013-10-13 14:52:57 | python-dev | set | messages: +msg199712 |
| 2013-10-12 18:39:12 | python-dev | set | messages: +msg199611 |
| 2013-09-29 19:36:17 | serhiy.storchaka | set | files: +makeaudiotests.py |
| 2013-09-29 19:31:40 | serhiy.storchaka | set | files: +audiotests_3.patch dependencies: +Broken support of compressed AIFC files messages: +msg198632 |
| 2013-09-06 21:39:23 | serhiy.storchaka | link | issue5202 dependencies |
| 2013-09-06 21:29:15 | serhiy.storchaka | set | files: +audiotests_2.patch |
| 2013-09-06 21:25:20 | serhiy.storchaka | set | dependencies: +Miscellaneous fixes for the sunau module |
| 2013-09-06 21:02:47 | serhiy.storchaka | set | messages: +msg197106 |
| 2013-09-04 11:32:06 | serhiy.storchaka | set | dependencies: +Add support of the 'with' statement to sunau.open. |
| 2013-09-04 11:30:36 | python-dev | set | nosy: +python-dev messages: +msg196903 |
| 2013-09-04 11:16:31 | Claudiu.Popa | set | messages: +msg196901 |
| 2013-09-04 11:11:50 | serhiy.storchaka | create | |