Skip to content

Commit

Permalink
[NOMERGE] Run pyscript test only
Browse files Browse the repository at this point in the history
  • Loading branch information
irgolic committed Aug 17, 2020
1 parent ccc7d41 commit 8b61ad5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions Orange/widgets/data/tests/test_owpythonscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# pylint: disable=protected-access
import os
import shutil
import unittest

from AnyQt.QtCore import QMimeData, QUrl, QPoint, Qt
from AnyQt.QtGui import QDragEnterEvent, QDropEvent, QTextCursor
Expand Down Expand Up @@ -58,10 +59,8 @@ def is_done():
self.widget.editor.text = script
self.widget.execute_button.click()

if not self.widget.console._OrangeConsoleWidget__is_ready:
self.process_events(until=lambda: self.widget.console._OrangeConsoleWidget__is_ready,
timeout=30000)
self.process_events(until=is_done)
self.process_events(until=is_done,
timeout=30000)

def test_inputs(self):
"""Check widget's inputs"""
Expand Down Expand Up @@ -450,3 +449,7 @@ def test_restore(self):
script_names = [s.filename for s in w.libraryList]
for filename in ('m.py', 'n.py', 'y.py'):
self.assertIn(filename, script_names)


if __name__ == "__main__":
unittest.main()
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ commands_pre =
pip freeze
commands =
# --buffer
python -m unittest --verbose Orange.tests Orange.widgets.tests
python -m unittest --verbose Orange/widgets/data/tests/test_owpythonscript.py

[testenv:future_compatibility]
deps =
Expand Down

0 comments on commit 8b61ad5

Please sign in to comment.