Beispiel #1
0
    def test_set_func(self):

        c1 = Command('foo', 'my_adder', 'Target', t='t')

        self.failIf(c1.is_set())

        c1.func = lambda x: x
        self.failUnless(c1.is_set())
Beispiel #2
0
    def test_init(self):

        c1 = Command('foo', 'my_adder', 'Target', t='t')

        self.failUnlessEqual(c1.tag, 'foo')

        self.failIf(c1.is_set())

        self.failUnlessEqual(c1.adder, 'my_adder', 'foo')

        self.failUnlessEqual(c1.params, ['Target'], 'foo')

        self.failUnlessEqual(c1.kparams, {'t': 't'}, 'foo')