Working toward sqlalchemy extension. Better ability to extend context. Still needs a lot of cleanup.

This commit is contained in:
Romain Dorgueil
2017-01-03 22:06:09 +01:00
parent 6bfe751c73
commit f736e7e7e3
27 changed files with 387 additions and 142 deletions

View File

@ -5,7 +5,8 @@ from bonobo.core.bags import INHERIT_INPUT
args = (
'foo',
'bar', )
'bar',
)
kwargs = dict(acme='corp')
@ -40,13 +41,15 @@ def test_inherit():
assert bag2.args == (
'a',
'b', )
'b',
)
assert bag2.kwargs == {'a': 1, 'b': 2}
assert INHERIT_INPUT in bag2.flags
assert bag3.args == (
'a',
'c', )
'c',
)
assert bag3.kwargs == {'a': 1, 'c': 3}
assert bag3.flags is ()
@ -57,7 +60,8 @@ def test_inherit():
bag4.set_parent(bag)
assert bag4.args == (
'a',
'd', )
'd',
)
assert bag4.kwargs == {'a': 1, 'd': 4}
assert bag4.flags is ()
@ -65,7 +69,8 @@ def test_inherit():
assert bag4.args == (
'a',
'c',
'd', )
'd',
)
assert bag4.kwargs == {'a': 1, 'c': 3, 'd': 4}
assert bag4.flags is ()

View File

@ -5,7 +5,8 @@ class MyThingWithStats(WithStatistics):
def get_stats(self, *args, **kwargs):
return (
('foo', 42),
('bar', 69), )
('bar', 69),
)
def test_with_statistics():