Skip to content

Commit

Permalink
test_workflows: Improve cleanup in test_workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ales-erjavec committed Sep 22, 2022
1 parent 2edd71c commit ee8afe6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Orange/widgets/tests/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import unittest
import pkg_resources

from AnyQt.QtTest import QTest

from orangecanvas.registry import WidgetRegistry
from orangewidget.workflow import widgetsscheme

Expand Down Expand Up @@ -46,6 +48,7 @@ def test_scheme_examples(self):
new_scheme.widget_manager.set_creation_policy(
new_scheme.widget_manager.Immediate
)
new_scheme.signal_manager.pause()
with open(ows_file, "rb") as f:
try:
with excepthook_catch(raise_on_exit=True):
Expand All @@ -55,6 +58,9 @@ def test_scheme_examples(self):
format(ows_file, str(e)))
finally:
new_scheme.clear()
new_scheme.deleteLater()
del new_scheme
QTest.qWait(0)

def test_examples_order(self):
# register test entrypoints
Expand Down

0 comments on commit ee8afe6

Please sign in to comment.