def test_non_empty_on_timeout_no_cb(self, qtbot, signaller): """ Tests that all_signals_and_args contains the emitted signals. No callbacks for arg-evaluation are provided. The signals are emitted out of order, causing a timeout. """ signals = get_mixed_signals_with_guaranteed_name(signaller) with qtbot.waitSignals(signals=signals, timeout=200, check_params_cbs=None, order="simple", raising=False) as blocker: signaller.signal_args.emit('1', 1) signaller.signal.emit() assert not blocker.signal_triggered assert blocker.all_signals_and_args == [ SignalAndArgs(signal_name='signal_args(QString,int)', args=('1', 1)), SignalAndArgs(signal_name='signal()', args=()) ]
def test_signalandargs_inequality(): signal_args1_1 = SignalAndArgs(signal_name="signal", args=(1, 2)) signal_args1_2 = "foo" assert signal_args1_1 != signal_args1_2
def test_signalandargs_equality(): signal_args1 = SignalAndArgs(signal_name="signal", args=(1, 2)) signal_args2 = SignalAndArgs(signal_name="signal", args=(1, 2)) assert signal_args1 == signal_args2