mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 16:07:30 +03:00 
			
		
		
		
	warn category defaults to UserWarning
This commit is contained in:
		
							parent
							
								
									0d7115a5a4
								
							
						
					
					
						commit
						4877d52cf4
					
				|  | @ -121,9 +121,9 @@ def assert_no_exception(func): | ||||||
| def assert_warning(warn_class, func): | def assert_warning(warn_class, func): | ||||||
|     # note: this assert calls func three times! |     # note: this assert calls func three times! | ||||||
|     import warnings |     import warnings | ||||||
|     def warn_error(message, category, **options): |     def warn_error(message, category=UserWarning, **options): | ||||||
|         raise category(message) |         raise category(message) | ||||||
|     def warn_ignore(message, category, **options): |     def warn_ignore(message, category=UserWarning, **options): | ||||||
|         pass |         pass | ||||||
|     warn = warnings.warn |     warn = warnings.warn | ||||||
|     result = None |     result = None | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user