mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +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):
|
||||
# note: this assert calls func three times!
|
||||
import warnings
|
||||
def warn_error(message, category, **options):
|
||||
def warn_error(message, category=UserWarning, **options):
|
||||
raise category(message)
|
||||
def warn_ignore(message, category, **options):
|
||||
def warn_ignore(message, category=UserWarning, **options):
|
||||
pass
|
||||
warn = warnings.warn
|
||||
result = None
|
||||
|
|
Loading…
Reference in New Issue
Block a user