Skip to content

Commit

Permalink
Test process filter
Browse files Browse the repository at this point in the history
  • Loading branch information
tfarago committed Sep 21, 2014
1 parent 8fe3f58 commit 01e4a0e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion concert/tests/unit/test_coroutines.py
@@ -1,7 +1,8 @@
import numpy as np
from concert.coroutines.base import coroutine, broadcast, inject
from concert.coroutines.filters import (absorptivity, backproject, flat_correct, average_images,
queue, sinograms, downsize, stall, PickSlice, Timer)
queue, sinograms, downsize, stall, PickSlice, Timer,
process)
from concert.coroutines.sinks import null, Result, Accumulate
from concert.tests import assert_almost_equal, TestCase

Expand Down Expand Up @@ -155,6 +156,11 @@ def test_accumulate(self):
inject(generator(), accumulate())
self.assertEqual(accumulate.items, range(5))

def test_process(self):
result = Result()
inject((1,), process(lambda x: -x, result()))
self.assertEqual(-1, result.result)


class TestTimer(TestCase):

Expand Down

0 comments on commit 01e4a0e

Please sign in to comment.