summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJosh Blum2012-12-05 02:28:45 -0800
committerJosh Blum2012-12-05 02:28:45 -0800
commite9abed0e1cb28e2c5761910e523fb01fe38f2527 (patch)
treea1fdb37051995446877b3f25b29cb2d8cb69f48c /tests
parent094a5945da96ce202eacb665cf401ab96c6c1d95 (diff)
downloadsandhi-e9abed0e1cb28e2c5761910e523fb01fe38f2527.tar.gz
sandhi-e9abed0e1cb28e2c5761910e523fb01fe38f2527.tar.bz2
sandhi-e9abed0e1cb28e2c5761910e523fb01fe38f2527.zip
using new PMC convenience functions
Diffstat (limited to 'tests')
-rw-r--r--tests/demo_blocks.py4
-rw-r--r--tests/sbuffer_test.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/demo_blocks.py b/tests/demo_blocks.py
index 7f9c12f..8550402 100644
--- a/tests/demo_blocks.py
+++ b/tests/demo_blocks.py
@@ -69,7 +69,7 @@ class TagSource(gras.Block):
def work(self, ins, outs):
offset = self.get_produced(0)
- tag = gras.Tag(offset, Py2PMC(self._values[0]))
+ tag = gras.Tag(offset, PMC_M(self._values[0]))
self.post_output_tag(0, tag)
self.produce(0, len(outs[0]))
self._values = self._values[1:]
@@ -91,5 +91,5 @@ class TagSink(gras.Block):
max_read = self.get_consumed(0) + len(ins[0])
for tag in self.get_input_tags(0):
if tag.offset < max_read:
- self._values.append(PMC2Py(tag.object))
+ self._values.append(tag.object())
self.consume(0, len(ins[0]))
diff --git a/tests/sbuffer_test.py b/tests/sbuffer_test.py
index 1805175..da21909 100644
--- a/tests/sbuffer_test.py
+++ b/tests/sbuffer_test.py
@@ -49,9 +49,9 @@ class SBufferTest(unittest.TestCase):
c = gras.SBufferConfig()
c.length = 4
s0 = gras.SBuffer(c)
- p = Py2PMC(s0)
+ p = PMC_M(s0)
print p
- s1 = PMC2Py(p)
+ s1 = p()
self.assertEqual(c.length, s1.length)
self.assertEqual(c.length, len(s1))