diff --git a/tests/test_decorators.py b/tests/test_decorators.py index b48bb8e..2213abc 100644 --- a/tests/test_decorators.py +++ b/tests/test_decorators.py @@ -8,7 +8,7 @@ class TestDecorator(unittest.TestCase): def test_no_parameters(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -24,7 +24,7 @@ class TestDecorator(unittest.TestCase): def test_instance_method_as_decorator(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} class Instance(object): def __init__(self): @@ -52,7 +52,7 @@ class TestDecorator(unittest.TestCase): def test_class_method_as_decorator(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} class Instance(object): count = 0 @@ -78,7 +78,7 @@ class TestDecorator(unittest.TestCase): def test_class_type_as_decorator(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator class ClassDecorator(object): @@ -95,7 +95,7 @@ class TestDecorator(unittest.TestCase): def test_class_type_as_decorator_args(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator class ClassDecorator(object): diff --git a/tests/test_function.py b/tests/test_function.py index 836b32a..906336a 100644 --- a/tests/test_function.py +++ b/tests/test_function.py @@ -79,7 +79,7 @@ class TestCallingFunction(unittest.TestCase): def test_call_function(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): diff --git a/tests/test_inner_classmethod.py b/tests/test_inner_classmethod.py index 0a8f7de..babd621 100644 --- a/tests/test_inner_classmethod.py +++ b/tests/test_inner_classmethod.py @@ -124,7 +124,7 @@ class TestCallingInnerClassMethod(unittest.TestCase): # Test calling classmethod. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -151,7 +151,7 @@ class TestCallingInnerClassMethod(unittest.TestCase): # Test calling classmethod via class instance. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -178,7 +178,7 @@ class TestCallingInnerClassMethod(unittest.TestCase): # Test calling classmethod. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -206,7 +206,7 @@ class TestCallingInnerClassMethod(unittest.TestCase): # Test calling classmethod via class instance. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): diff --git a/tests/test_inner_staticmethod.py b/tests/test_inner_staticmethod.py index d012aad..897be06 100644 --- a/tests/test_inner_staticmethod.py +++ b/tests/test_inner_staticmethod.py @@ -124,7 +124,7 @@ class TestCallingInnerStaticMethod(unittest.TestCase): # Test calling staticmethod. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -151,7 +151,7 @@ class TestCallingInnerStaticMethod(unittest.TestCase): # Test calling staticmethod via class instance. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -178,7 +178,7 @@ class TestCallingInnerStaticMethod(unittest.TestCase): # Test calling staticmethod. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -206,7 +206,7 @@ class TestCallingInnerStaticMethod(unittest.TestCase): # Test calling staticmethod via class instance. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): diff --git a/tests/test_instancemethod.py b/tests/test_instancemethod.py index 3326fd3..7d2de50 100644 --- a/tests/test_instancemethod.py +++ b/tests/test_instancemethod.py @@ -228,7 +228,7 @@ class TestCallingInstanceMethodOldStyle(unittest.TestCase): # instance directly. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -254,7 +254,7 @@ class TestCallingInstanceMethodOldStyle(unittest.TestCase): # Test calling instancemethod via class instance. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -281,7 +281,7 @@ class TestCallingInstanceMethodOldStyle(unittest.TestCase): # instance directly. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -308,7 +308,7 @@ class TestCallingInstanceMethodOldStyle(unittest.TestCase): # Test calling instancemethod via class instance. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -338,7 +338,7 @@ class TestCallingInstanceMethodNewStyle(unittest.TestCase): # instance directly. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -364,7 +364,7 @@ class TestCallingInstanceMethodNewStyle(unittest.TestCase): # Test calling instancemethod via class instance. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -391,7 +391,7 @@ class TestCallingInstanceMethodNewStyle(unittest.TestCase): # instance directly. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -418,7 +418,7 @@ class TestCallingInstanceMethodNewStyle(unittest.TestCase): # Test calling instancemethod via class instance. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): diff --git a/tests/test_monkey_patching.py b/tests/test_monkey_patching.py index 6d48c85..61c82c5 100644 --- a/tests/test_monkey_patching.py +++ b/tests/test_monkey_patching.py @@ -36,7 +36,7 @@ class TestMonkeyPatching(unittest.TestCase): def test_function_wrapper(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -60,7 +60,7 @@ class TestMonkeyPatching(unittest.TestCase): def test_function_wrapper_instance_method(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -88,7 +88,7 @@ class TestMonkeyPatching(unittest.TestCase): def test_function_wrapper_class_method(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -115,7 +115,7 @@ class TestMonkeyPatching(unittest.TestCase): def test_wrap_function_module_name(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -136,7 +136,7 @@ class TestMonkeyPatching(unittest.TestCase): def test_wrap_function_module(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -159,7 +159,7 @@ class TestMonkeyPatching(unittest.TestCase): def test_wrap_instance_method_module_name(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -183,7 +183,7 @@ class TestMonkeyPatching(unittest.TestCase): def test_wrap_class_method_module_name(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -205,7 +205,7 @@ class TestMonkeyPatching(unittest.TestCase): def test_wrap_static_method_module_name(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -227,7 +227,7 @@ class TestMonkeyPatching(unittest.TestCase): def test_patch_function_module_name(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -247,7 +247,7 @@ class TestMonkeyPatching(unittest.TestCase): def test_patch_function_module(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -272,7 +272,7 @@ class TestMonkeyPatching(unittest.TestCase): def test_transient_function_wrapper(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -298,7 +298,7 @@ class TestMonkeyPatching(unittest.TestCase): def test_transient_function_wrapper_instance_method(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -329,7 +329,7 @@ class TestExplicitMonkeyPatching(unittest.TestCase): def test_patch_instance_method_class(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -357,7 +357,7 @@ class TestExplicitMonkeyPatching(unittest.TestCase): def test_patch_instance_method_dict(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -385,7 +385,7 @@ class TestExplicitMonkeyPatching(unittest.TestCase): def test_patch_instance_method_instance(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] @@ -413,7 +413,7 @@ class TestExplicitMonkeyPatching(unittest.TestCase): def test_patch_instance_method_extracted(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} called = [] diff --git a/tests/test_nested_function.py b/tests/test_nested_function.py index 8ef25bf..f9bc497 100644 --- a/tests/test_nested_function.py +++ b/tests/test_nested_function.py @@ -79,7 +79,7 @@ class TestCallingNestedFunction(unittest.TestCase): def test_call_function(self): _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): diff --git a/tests/test_object_proxy.py b/tests/test_object_proxy.py index 02c0663..a77e13f 100644 --- a/tests/test_object_proxy.py +++ b/tests/test_object_proxy.py @@ -348,7 +348,7 @@ class TestCallingObject(unittest.TestCase): def test_function_kwargs(self): _args = () - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} def function(*args, **kwargs): return args, kwargs @@ -361,7 +361,7 @@ class TestCallingObject(unittest.TestCase): def test_function_args_plus_kwargs(self): _args = (1, 2) - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} def function(*args, **kwargs): return args, kwargs @@ -402,7 +402,7 @@ class TestCallingObject(unittest.TestCase): def test_instancemethod_kwargs(self): _args = () - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} class Class(object): def function(self, *args, **kwargs): @@ -416,7 +416,7 @@ class TestCallingObject(unittest.TestCase): def test_instancemethod_args_plus_kwargs(self): _args = (1, 2) - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} class Class(object): def function(self, *args, **kwargs): @@ -458,7 +458,7 @@ class TestCallingObject(unittest.TestCase): def test_instancemethod_via_class_kwargs(self): _args = () - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} class Class(object): def function(self, *args, **kwargs): @@ -472,7 +472,7 @@ class TestCallingObject(unittest.TestCase): def test_instancemethod_via_class_args_plus_kwargs(self): _args = (1, 2) - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} class Class(object): def function(self, *args, **kwargs): @@ -516,7 +516,7 @@ class TestCallingObject(unittest.TestCase): def test_classmethod_kwargs(self): _args = () - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} class Class(object): @classmethod @@ -531,7 +531,7 @@ class TestCallingObject(unittest.TestCase): def test_classmethod_args_plus_kwargs(self): _args = (1, 2) - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} class Class(object): @classmethod @@ -576,7 +576,7 @@ class TestCallingObject(unittest.TestCase): def test_classmethod_via_class_kwargs(self): _args = () - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} class Class(object): @classmethod @@ -591,7 +591,7 @@ class TestCallingObject(unittest.TestCase): def test_classmethod_via_class_args_plus_kwargs(self): _args = (1, 2) - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} class Class(object): @classmethod @@ -636,7 +636,7 @@ class TestCallingObject(unittest.TestCase): def test_staticmethod_kwargs(self): _args = () - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} class Class(object): @staticmethod @@ -651,7 +651,7 @@ class TestCallingObject(unittest.TestCase): def test_staticmethod_args_plus_kwargs(self): _args = (1, 2) - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} class Class(object): @staticmethod @@ -696,7 +696,7 @@ class TestCallingObject(unittest.TestCase): def test_staticmethod_via_class_kwargs(self): _args = () - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} class Class(object): @staticmethod @@ -711,7 +711,7 @@ class TestCallingObject(unittest.TestCase): def test_staticmethod_via_class_args_plus_kwargs(self): _args = (1, 2) - _kwargs = { "one": 1, "two": 2 } + _kwargs = {"one": 1, "two": 2} class Class(object): @staticmethod diff --git a/tests/test_outer_classmethod.py b/tests/test_outer_classmethod.py index da987a3..a571491 100644 --- a/tests/test_outer_classmethod.py +++ b/tests/test_outer_classmethod.py @@ -129,7 +129,7 @@ class TestCallingOuterClassMethod(unittest.TestCase): # actual arguments following that. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -161,7 +161,7 @@ class TestCallingOuterClassMethod(unittest.TestCase): # first argument with the actual arguments following that. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): diff --git a/tests/test_outer_staticmethod.py b/tests/test_outer_staticmethod.py index 49fdc9b..3862b22 100644 --- a/tests/test_outer_staticmethod.py +++ b/tests/test_outer_staticmethod.py @@ -127,7 +127,7 @@ class TestCallingOuterStaticMethod(unittest.TestCase): # doesn't bind the method and treats it like a normal function. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): @@ -158,7 +158,7 @@ class TestCallingOuterStaticMethod(unittest.TestCase): # like a normal function. _args = (1, 2) - _kwargs = { 'one': 1, 'two': 2 } + _kwargs = {'one': 1, 'two': 2} @wrapt.decorator def _decorator(wrapped, instance, args, kwargs): diff --git a/tests/test_update_attributes.py b/tests/test_update_attributes.py index cd863ce..ae053e4 100644 --- a/tests/test_update_attributes.py +++ b/tests/test_update_attributes.py @@ -143,7 +143,7 @@ class TestUpdateAttributes(unittest.TestCase): self.assertRaises(AttributeError, run, ()) - override_annotations = { 'override_annotations': '' } + override_annotations = {'override_annotations': ''} function.__annotations__ = override_annotations self.assertEqual(function.__annotations__, override_annotations) @@ -166,7 +166,7 @@ class TestUpdateAttributes(unittest.TestCase): self.assertRaises(AttributeError, run, ()) - override_annotations = { 'override_annotations': '' } + override_annotations = {'override_annotations': ''} instance.__annotations__ = override_annotations self.assertEqual(function.__annotations__, override_annotations)