aboutsummaryrefslogtreecommitdiff
path: root/tests/test_toolkit_common.py
blob: d90384260cf43ad79709c197ff268fcedcc347ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from pytestqt import qtbot
from avp.command import Command
from avp.toolkit import blockSignals


def test_blockSignals(qtbot):
    command = Command()
    command.core.insertComponent(0, 0, command)
    comp = command.core.selectedComponents[0]
    assert comp.page.spinBox_scale.signalsBlocked() == False
    with blockSignals(comp.page.spinBox_scale):
        assert comp.page.spinBox_scale.signalsBlocked() == True
    assert comp.page.spinBox_scale.signalsBlocked() == False