

def test_wait_signal(qtbot):
    x = []

    def f():
        x.append(0)
    timer = QTimer()
    timer.setInterval(100)
    timer.setSingleShot(True)
    timer.timeout.connect(f)
    timer.start()
    assert (x == [])
    with _wait_signal(timer.timeout):
        pass
    assert (x == [0])

dataset/ETHPy150Open kwikteam/phy/phy/gui/tests/test_qt.py test_wait_signal/original