mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	bpo-40927: Fix test_binhex when run twice (GH-20764)
test_binhex now uses import_fresh_module() to ensure that it raises DeprecationWarning each time.
This commit is contained in:
		
							parent
							
								
									8eb4aea262
								
							
						
					
					
						commit
						9c24e2e4c1
					
				
					 2 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -7,7 +7,7 @@ import unittest
 | 
			
		|||
from test import support
 | 
			
		||||
 | 
			
		||||
with support.check_warnings(('', DeprecationWarning)):
 | 
			
		||||
    import binhex
 | 
			
		||||
    binhex = support.import_fresh_module('binhex')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class BinHexTestCase(unittest.TestCase):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,2 @@
 | 
			
		|||
Fix test_binhex when run twice: it now uses import_fresh_module() to ensure
 | 
			
		||||
that it raises DeprecationWarning each time.
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue