John Vandenberg has uploaded a new change for review.
https://gerrit.wikimedia.org/r/203643
Change subject: Allow pywinauto to be missing
......................................................................
Allow pywinauto to be missing
Change-Id: Ifc82582ee2044f1753d0f2c7b9aff4c0f901f259
---
M tests/ui_tests.py
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/43/203643/1
diff --git a/tests/ui_tests.py b/tests/ui_tests.py
index 20e8204..462a8c8 100644
--- a/tests/ui_tests.py
+++ b/tests/ui_tests.py
@@ -34,6 +34,11 @@
import time
import io
+try:
+ import pywinauto
+except ImportError:
+ pywinauto = None
+
import pywikibot
from pywikibot.bot import (
ui, DEBUG, VERBOSE, INFO, STDOUT, INPUT, WARNING, ERROR, CRITICAL
@@ -486,11 +491,12 @@
def setUpClass(cls):
if os.name != 'nt':
raise unittest.SkipTest('requires Windows console')
+ if not pywinauto:
+ raise unittest.SkipTest('requires Windows package pywinauto')
super(WindowsTerminalTestCase, cls).setUpClass()
@classmethod
def setUpProcess(cls, command):
- import pywinauto
import subprocess
si = subprocess.STARTUPINFO()
si.dwFlags = subprocess.STARTF_USESTDHANDLES
--
To view, visit https://gerrit.wikimedia.org/r/203643
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc82582ee2044f1753d0f2c7b9aff4c0f901f259
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits