9
9
CallbackCalledTwiceError ,
10
10
)
11
11
from pytestqt .qt_compat import qt_api
12
- from pytestqt .wait_signal import (
13
- SignalBlocker ,
14
- MultiSignalBlocker ,
15
- SignalEmittedSpy ,
16
- CallbackBlocker ,
17
- )
12
+ from pytestqt import wait_signal
18
13
19
14
20
15
def _parse_ini_boolean (value ):
@@ -353,7 +348,7 @@ def waitSignal(self, signal, *, timeout=5000, raising=None, check_params_cb=None
353
348
f"Passing None as signal isn't supported anymore, use qtbot.wait({ timeout } ) instead."
354
349
)
355
350
raising = self ._should_raise (raising )
356
- blocker = SignalBlocker (
351
+ blocker = wait_signal . SignalBlocker (
357
352
timeout = timeout , raising = raising , check_params_cb = check_params_cb
358
353
)
359
354
blocker .connect (signal )
@@ -440,7 +435,7 @@ def waitSignals(
440
435
len (check_params_cbs ), len (signals )
441
436
)
442
437
)
443
- blocker = MultiSignalBlocker (
438
+ blocker = wait_signal . MultiSignalBlocker (
444
439
timeout = timeout ,
445
440
raising = raising ,
446
441
order = order ,
@@ -458,7 +453,7 @@ def wait(self, ms):
458
453
While waiting, events will be processed and your test will stay
459
454
responsive to user interface events or network communication.
460
455
"""
461
- blocker = MultiSignalBlocker (timeout = ms , raising = False )
456
+ blocker = wait_signal . MultiSignalBlocker (timeout = ms , raising = False )
462
457
blocker .wait ()
463
458
464
459
@contextlib .contextmanager
@@ -478,7 +473,7 @@ def assertNotEmitted(self, signal, *, wait=0):
478
473
.. note:: This method is also available as ``assert_not_emitted``
479
474
(pep-8 alias)
480
475
"""
481
- spy = SignalEmittedSpy (signal )
476
+ spy = wait_signal . SignalEmittedSpy (signal )
482
477
with spy , self .waitSignal (signal , timeout = wait , raising = False ):
483
478
yield
484
479
spy .assert_not_emitted ()
@@ -592,7 +587,7 @@ def waitCallback(self, *, timeout=5000, raising=None):
592
587
.. note:: This method is also available as ``wait_callback`` (pep-8 alias)
593
588
"""
594
589
raising = self ._should_raise (raising )
595
- blocker = CallbackBlocker (timeout = timeout , raising = raising )
590
+ blocker = wait_signal . CallbackBlocker (timeout = timeout , raising = raising )
596
591
return blocker
597
592
598
593
@contextlib .contextmanager
0 commit comments