diff options
author | Josh Blum | 2012-11-05 22:59:47 -0800 |
---|---|---|
committer | Josh Blum | 2012-11-05 22:59:47 -0800 |
commit | 37a863991f5e05035cce6738379de7a8ebc2b160 (patch) | |
tree | c7f2c7732074d69f1b3fe147f5fb32d92c34c9c8 /tests | |
parent | ed68f79a7a2e3c1bdbe0a2b4c5498ac29e431cce (diff) | |
download | sandhi-37a863991f5e05035cce6738379de7a8ebc2b160.tar.gz sandhi-37a863991f5e05035cce6738379de7a8ebc2b160.tar.bz2 sandhi-37a863991f5e05035cce6738379de7a8ebc2b160.zip |
polish up work and notify api
There is a formal api to mark done, and IO failures.
Notify topology was created for consistency.
So far, there output fail is unimplemented,
and input fail requires an additional check.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/block_test.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/block_test.py b/tests/block_test.py index d510b6e..b598b27 100644 --- a/tests/block_test.py +++ b/tests/block_test.py @@ -8,16 +8,16 @@ class NullSource(gras.Block): gras.Block.__init__(self, 'NullSource') self.set_output_signature([numpy.int32]) - def callback(self, x): - print x + def work(self, ins, outs): + self.mark_done() class NullSink(gras.Block): def __init__(self): gras.Block.__init__(self, 'NullSink') self.set_input_signature([numpy.int32]) - def callback(self, x): - print x + def work(self, ins, outs): + self.mark_done() class BlockTest(unittest.TestCase): @@ -26,10 +26,6 @@ class BlockTest(unittest.TestCase): null_sink = NullSink() - #null_src.doit(321) - - #return - tb = gras.TopBlock() print 'connect...' |