basic reimplementation of what was working in rdc.etl, jupyter widget, json import, demo with opendatasoft api, etc. Lot of things are still work in progress, stay tuned.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from bonobo.core.graph import Graph
|
||||
from bonobo.core.tokens import BEGIN
|
||||
from bonobo.core.graphs import Graph
|
||||
from bonobo.util.tokens import BEGIN
|
||||
|
||||
identity = lambda x: x
|
||||
|
||||
|
||||
@ -19,8 +19,8 @@ from queue import Empty
|
||||
import pytest
|
||||
|
||||
from bonobo.core.errors import InactiveWritableError, InactiveReadableError
|
||||
from bonobo.core.io import Input
|
||||
from bonobo.core.tokens import BEGIN, END
|
||||
from bonobo.core.inputs import Input
|
||||
from bonobo.util.tokens import BEGIN, END
|
||||
|
||||
|
||||
def test_input_runlevels():
|
||||
|
||||
24
tests/core/test_services.py
Normal file
24
tests/core/test_services.py
Normal file
@ -0,0 +1,24 @@
|
||||
from bonobo import inject, service
|
||||
|
||||
|
||||
class MyFoo():
|
||||
pass
|
||||
|
||||
def test_service_is_singleton():
|
||||
@service
|
||||
def foo():
|
||||
return MyFoo()
|
||||
|
||||
assert foo() is foo()
|
||||
|
||||
@inject(foo)
|
||||
def bar(myfoo):
|
||||
assert myfoo is foo()
|
||||
|
||||
bar()
|
||||
|
||||
foo2 = foo.define()
|
||||
|
||||
assert type(foo()) == type(foo2())
|
||||
assert foo2() is not foo()
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from bonobo.core.tokens import Token
|
||||
from bonobo.util.tokens import Token
|
||||
|
||||
|
||||
def test_token_repr():
|
||||
|
||||
Reference in New Issue
Block a user