mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Merged revisions 82856-82857 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82856 | victor.stinner | 2010-07-14 01:04:56 +0200 (mer., 14 juil. 2010) | 2 lines Issue #9243: Fix sndhdr module and add unit tests, contributed by James Lee. ........ r82857 | victor.stinner | 2010-07-14 01:08:01 +0200 (mer., 14 juil. 2010) | 2 lines Woops, test_sndhdr.py contains the same code twice: fix it ........
This commit is contained in:
		
							parent
							
								
									3f682adcf2
								
							
						
					
					
						commit
						964ee2669e
					
				
					 12 changed files with 19 additions and 4 deletions
				
			
		|  | @ -57,12 +57,12 @@ def whathdr(filename): | |||
| 
 | ||||
| def test_aifc(h, f): | ||||
|     import aifc | ||||
|     if h.startswith(b'FORM'): | ||||
|     if not h.startswith(b'FORM'): | ||||
|         return None | ||||
|     if h[8:12] == b'AIFC': | ||||
|         fmt = 'aifc' | ||||
|     elif h[8:12] == b'AIFF': | ||||
|         fmt = b'aiff' | ||||
|         fmt = 'aiff' | ||||
|     else: | ||||
|         return None | ||||
|     f.seek(0) | ||||
|  | @ -123,7 +123,7 @@ def test_hcom(h, f): | |||
| 
 | ||||
| 
 | ||||
| def test_voc(h, f): | ||||
|     if h.startswith(b'Creative Voice File\032'): | ||||
|     if not h.startswith(b'Creative Voice File\032'): | ||||
|         return None | ||||
|     sbseek = get_short_le(h[20:22]) | ||||
|     rate = 0 | ||||
|  | @ -150,7 +150,7 @@ def test_wav(h, f): | |||
| 
 | ||||
| 
 | ||||
| def test_8svx(h, f): | ||||
|     if h.startswith(b'FORM') or h[8:12] != b'8SVX': | ||||
|     if not h.startswith(b'FORM') or h[8:12] != b'8SVX': | ||||
|         return None | ||||
|     # Should decode it to get #channels -- assume always 1 | ||||
|     return '8svx', 0, 1, 0, 8 | ||||
|  |  | |||
							
								
								
									
										12
									
								
								Lib/test/sndhdrdata/README
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								Lib/test/sndhdrdata/README
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | |||
| Sound file samples used by Lib/test/test_sndhdr.py and generated using the | ||||
| following commands: | ||||
| 
 | ||||
|    dd if=/dev/zero of=sndhdr.raw bs=20 count=1 | ||||
|    sox -s -2 -c 2 -r 44100 sndhdr.raw sndhdr.<format> | ||||
| 
 | ||||
| Sound file samples used by Lib/test/test_sndhdr.py and generated using the | ||||
| following commands: | ||||
| 
 | ||||
|    dd if=/dev/zero of=sndhdr.raw bs=20 count=1 | ||||
|    sox -s -2 -c 2 -r 44100 sndhdr.raw sndhdr.<format> | ||||
| 
 | ||||
							
								
								
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.8svx
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.8svx
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.aifc
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.aifc
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.aiff
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.aiff
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.au
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.au
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.hcom
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.hcom
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.sndt
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.sndt
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.voc
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.voc
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.wav
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Lib/test/sndhdrdata/sndhdr.wav
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							|  | @ -433,6 +433,7 @@ Ben Laurie | |||
| Simon Law | ||||
| Chris Lawrence | ||||
| Brian Leair | ||||
| James Lee | ||||
| John J. Lee | ||||
| Inyeol Lee | ||||
| Thomas Lee | ||||
|  |  | |||
|  | @ -78,6 +78,8 @@ C-API | |||
| Library | ||||
| ------- | ||||
| 
 | ||||
| - Issue #9243: Fix sndhdr module and add unit tests, contributed by James Lee. | ||||
| 
 | ||||
| - ``ast.literal_eval()`` now allows byte literals. | ||||
| 
 | ||||
| - Issue #9137: Fix issue in MutableMapping.update, which incorrectly | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner