MCPcopy Index your code
hub / github.com/coleifer/huey / test_partial

Method test_partial

huey/tests/test_api.py:2154–2167  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2152 {'v1': 7, 'v2': 3, 'v3': 11}])
2153
2154 def test_partial(self):
2155 @self.huey.task()
2156 def add(a, b):
2157 return a + b
2158
2159 @self.huey.task()
2160 def mul(a, b):
2161 return a * b
2162
2163 pipe = add.s(1, 2).then(add, 3).then(add, 4).then(add, 5)
2164 self.assertPipe(pipe, [3, 6, 10, 15])
2165
2166 pipe = add.s(1, 2).then(mul, 4).then(add, -5).then(mul, 3).then(add, 8)
2167 self.assertPipe(pipe, [3, 12, 7, 21, 29])
2168
2169 def test_mixed_tasks_instances(self):
2170 @self.huey.task()

Callers

nothing calls this directly

Calls 3

assertPipeMethod · 0.95
sMethod · 0.80
thenMethod · 0.45

Tested by

no test coverage detected