mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
test: qapp must shutdown cli server before checking for leaked QTimer
This commit is contained in:
@ -27,9 +27,8 @@ def qapplication(qtbot, request, testable_qtimer_class): # pylint: disable=unus
|
|||||||
if request.node.stash._storage.get("failed"):
|
if request.node.stash._storage.get("failed"):
|
||||||
print("Test failed, skipping cleanup checks")
|
print("Test failed, skipping cleanup checks")
|
||||||
return
|
return
|
||||||
|
bec_dispatcher = bec_dispatcher_module.BECDispatcher()
|
||||||
# qapp = BECApplication()
|
bec_dispatcher.stop_cli_server()
|
||||||
# qapp.shutdown()
|
|
||||||
|
|
||||||
testable_qtimer_class.check_all_stopped(qtbot)
|
testable_qtimer_class.check_all_stopped(qtbot)
|
||||||
qapp = QApplication.instance()
|
qapp = QApplication.instance()
|
||||||
@ -55,6 +54,8 @@ def bec_dispatcher(threads_check): # pylint: disable=unused-argument
|
|||||||
bec_dispatcher.disconnect_all()
|
bec_dispatcher.disconnect_all()
|
||||||
# clean BEC client
|
# clean BEC client
|
||||||
bec_dispatcher.client.shutdown()
|
bec_dispatcher.client.shutdown()
|
||||||
|
# stop the cli server
|
||||||
|
bec_dispatcher.stop_cli_server()
|
||||||
# reinitialize singleton for next test
|
# reinitialize singleton for next test
|
||||||
bec_dispatcher_module.BECDispatcher.reset_singleton()
|
bec_dispatcher_module.BECDispatcher.reset_singleton()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user