release: 0.5.1

This commit is contained in:
Romain Dorgueil
2017-10-21 12:49:34 +02:00
parent 9faed8fa38
commit c7f39aa851
19 changed files with 196 additions and 119 deletions

View File

@ -50,7 +50,10 @@ def test_define_with_decorator():
calls = []
def my_handler(*args, **kwargs):
calls.append((args, kwargs, ))
calls.append((
args,
kwargs,
))
Concrete = MethodBasedConfigurable(my_handler)
@ -74,7 +77,10 @@ def test_late_binding_method_decoration():
@MethodBasedConfigurable(foo='foo')
def Concrete(*args, **kwargs):
calls.append((args, kwargs, ))
calls.append((
args,
kwargs,
))
assert callable(Concrete.handler)
t = Concrete(bar='baz')
@ -89,7 +95,10 @@ def test_define_with_argument():
calls = []
def concrete_handler(*args, **kwargs):
calls.append((args, kwargs, ))
calls.append((
args,
kwargs,
))
t = MethodBasedConfigurable(concrete_handler, 'foo', bar='baz')
assert callable(t.handler)
@ -103,7 +112,10 @@ def test_define_with_inheritance():
class Inheriting(MethodBasedConfigurable):
def handler(self, *args, **kwargs):
calls.append((args, kwargs, ))
calls.append((
args,
kwargs,
))
t = Inheriting('foo', bar='baz')
assert callable(t.handler)
@ -120,7 +132,10 @@ def test_inheritance_then_decorate():
@Inheriting
def Concrete(*args, **kwargs):
calls.append((args, kwargs, ))
calls.append((
args,
kwargs,
))
assert callable(Concrete.handler)
t = Concrete('foo', bar='baz')