jenkins-bot has submitted this change and it was merged.
Change subject: Fix match_images script test ......................................................................
Fix match_images script test
- Add match_images script dependency on PIL.ImageTk - Expect an error if called without arguments.
Change-Id: Id17b86983ce8b6f15ed26c633f8a71bc2d129454 --- M tests/script_tests.py 1 file changed, 7 insertions(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/script_tests.py b/tests/script_tests.py index bdb5a9d..9a9c88f 100644 --- a/tests/script_tests.py +++ b/tests/script_tests.py @@ -19,12 +19,17 @@
scripts_path = os.path.join(_root_dir, 'scripts')
+# These dependencies are not always the package name which is in setup.py. +# e.g. 'PIL.ImageTk' is a object provided by several different pypi packages, +# and setup.py requests that 'Pillow' is installed to provide 'PIL.ImageTk'. +# Here, it doesnt matter which pypi package was requested and installed. +# Here, the name given to the module which will be imported is required. script_deps = { 'script_wui': ['crontab', 'lua'], # Note: package 'lunatic-python' provides module 'lua'
'flickrripper': ['flickrapi'], - + 'match_images': ['PIL.ImageTk'], 'states_redirect': ['pycountry'], } if sys.version_info < (2, 7): @@ -124,6 +129,7 @@ 'imageuncat': 'You have to specify the generator ', 'interwiki': 'does not exist. Skipping.', # 'Test page' does not exist 'login': 'Logged in on ', + 'match_images': 'Require two images to work on.', 'pagefromfile': 'Please enter the file name', 'replace': 'Press Enter to use this automatic message', 'script_wui': 'Pre-loading all relevant page contents',
pywikibot-commits@lists.wikimedia.org