Example #1
0
    def test_set_binds_varargs(self):
        t1 = Task()
        t2 = Task()
        l = collections.Set()
        with Flow(name="test") as f:
            l.bind(t1, t2)

        assert set([t1, t2, l]) == f.tasks
        assert Edge(t1, l, key="arg_1") in f.edges
        assert Edge(t2, l, key="arg_2") in f.edges
Example #2
0
 def test_set_returns_a_set(self):
     l = collections.Set()
     with Flow(name="test") as f:
         l.bind(1, 2)
     assert f.run().result[l].result == set([1, 2])