def test_func_name(): # Allow weird names, though not recommended s = Signal(lambda x: x, []) assert 'lambda' in s.name s = Signal(float, []) assert s.name == 'float'
def __init__(self): self.foo = Foo(parent=self) # Test no holding on _value and _last_value self.bar = Signal(stub, []) # Test no holding via frame HasSignals.__init__(self)
class Test(HasSignals): s2 = Signal(float, [])
class Test(HasSignals): s1 = Signal(lambda x: x, [])