mirror of
				https://github.com/django/django.git
				synced 2025-10-25 22:56:12 +00:00 
			
		
		
		
	Also don't compete with -W CLI option. Thanks to Aymeric Augustin for the catch, and Claude Paroz for the patch.
		
			
				
	
	
		
			12 lines
		
	
	
		
			248 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			248 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import warnings
 | |
| 
 | |
| from django.test import TestCase
 | |
| 
 | |
| warnings.warn("module-level warning from deprecation_app", DeprecationWarning)
 | |
| 
 | |
| class DummyTest(TestCase):
 | |
|     def test_warn(self):
 | |
|         warnings.warn("warning from test", DeprecationWarning)
 | |
| 
 | |
| 
 |