diff options
author | Josh Blum | 2012-11-06 21:52:30 -0800 |
---|---|---|
committer | Josh Blum | 2012-11-06 21:52:30 -0800 |
commit | 12c56a0845a7b8e5cbff6ed20eae8b3fa3e26b2d (patch) | |
tree | 7c3a029df201a4aca7d1f550618637673eddb71a /tests/block_test.py | |
parent | b89c9abb84974492b4746a6fab5fe6cea920decb (diff) | |
download | sandhi-12c56a0845a7b8e5cbff6ed20eae8b3fa3e26b2d.tar.gz sandhi-12c56a0845a7b8e5cbff6ed20eae8b3fa3e26b2d.tar.bz2 sandhi-12c56a0845a7b8e5cbff6ed20eae8b3fa3e26b2d.zip |
consume and produce calls do it in-place
Diffstat (limited to 'tests/block_test.py')
-rw-r--r-- | tests/block_test.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/block_test.py b/tests/block_test.py index a6dccfc..c62ea6f 100644 --- a/tests/block_test.py +++ b/tests/block_test.py @@ -31,19 +31,11 @@ class VectorSource(gras.Block): def work(self, ins, outs): print 'vector source work' num = min(len(outs[0]), len(self._vec)) - if num == 0: - self.mark_done() - return - #print 'outs[0][:num] is ' - #print len(outs) - #print len(outs[0]) - #print outs[0][0] - #print outs[0][:num] outs[0][:num] = self._vec[:num] self.produce(0, num) self._vec = self._vec[num:] - #if not self._vec: - # self.mark_done() + if not self._vec: + self.mark_done() print 'vector source work done' class VectorSink(gras.Block): @@ -84,7 +76,7 @@ class BlockTest(unittest.TestCase): vec_sink = None def test_make_block(self): - return + #return null_src = NullSource() null_sink = NullSink() |