Import Upstream version 4.12.4
This commit is contained in:
@@ -53,7 +53,7 @@ def test_exc_wrapper():
|
||||
# Test with one callback first
|
||||
|
||||
@test_callback.register_exc_callback
|
||||
def handle_exception( # pylint: disable=unused-variable
|
||||
def handle_exception(
|
||||
self, keys, options, e, call_func, *args, **kwargs):
|
||||
assert args == (1, 2)
|
||||
assert kwargs == dict(a=1, b=2)
|
||||
@@ -151,7 +151,7 @@ def test_exc_callback_registration():
|
||||
pass
|
||||
|
||||
@callbacktest_subclass.register_exc_callback
|
||||
def exc_callback( # pylint: disable=unused-variable
|
||||
def exc_callback(
|
||||
self, keys, options, exc, call_func, *args, **kwargs):
|
||||
"""Subclass's private exception callback"""
|
||||
messages.append('Subclass registered callback')
|
||||
@@ -165,7 +165,7 @@ def test_exc_callback_registration():
|
||||
|
||||
|
||||
@callbacktest_base.register_exc_callback
|
||||
def exc_callback_2( # pylint: disable=unused-variable
|
||||
def exc_callback_2(
|
||||
self, keys, options, exc, call_func, *args, **kwargs):
|
||||
"""Callback on super class; doesn't affect the subclass"""
|
||||
messages.append('Superclass registered callback')
|
||||
|
||||
Reference in New Issue
Block a user