@contextmanager
def signal_tester(*signals):
    env = SignalTester()
    for signal in signals:
        signal.connect(env)
    try:
        (yield env)
    finally:
        for signal in signals:
            signal.disconnect(env)
@contextmanager
def signal_tester(*signals):
    env = SignalTester()
    for signal in signals:
        signal.connect(env)
    try:
        (yield env)
    finally:
        for signal in signals:
            signal.disconnect(env)