Build Update for jayvdb/pywikibot-core
-------------------------------------
Build: #153
Status: Fixed
Duration: 30 minutes and 10 seconds
Commit: 927e632 (test-userpage-watch-unwatch)
Author: John Vandenberg
Message: Fix bug in returned value of APISite.watch
Also add test for using Page.watch on the bot userpage,
which is obtained via new method TestCase.get_userpage.
Additional bug T77965 (badtoken) found.
Change-Id: Ibfe513a3351fb0a8bde5dc35862abc878f30c386
View the changeset: https://github.com/jayvdb/pywikibot-core/commit/927e632d1339
View the full build log and details: https://travis-ci.org/jayvdb/pywikibot-core/builds/43445655
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications
Build Update for jayvdb/pywikibot-core
-------------------------------------
Build: #151
Status: Still Failing
Duration: 31 minutes and 16 seconds
Commit: 26329fc (test-userpage-watch-unwatch)
Author: John Vandenberg
Message: Fix bug in returned value of APISite.watch
Also add test for using Page.watch on the bot userpage,
which is obtained via new method TestCase.get_userpage.
Change-Id: Ibfe513a3351fb0a8bde5dc35862abc878f30c386
View the changeset: https://github.com/jayvdb/pywikibot-core/compare/1d0f94cdcc61^...26329fcb06…
View the full build log and details: https://travis-ci.org/jayvdb/pywikibot-core/builds/43436435
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications
Build Update for jayvdb/pywikibot-core
-------------------------------------
Build: #150
Status: Failed
Duration: 29 minutes and 5 seconds
Commit: b39dfe5 (test-userpage-watch-unwatch)
Author: John Vandenberg
Message: Fix bug in returned value of APISite.watch
Also add test for using Page.watch on the bot userpage,
which is obtained via new method TestCase.get_userpage.
Change-Id: Ibfe513a3351fb0a8bde5dc35862abc878f30c386
View the changeset: https://github.com/jayvdb/pywikibot-core/compare/1d0f94cdcc61^...b39dfe5b68…
View the full build log and details: https://travis-ci.org/jayvdb/pywikibot-core/builds/43431089
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #1764
Status: Still Failing
Duration: 29 minutes and 20 seconds
Commit: 1d0f94c (master)
Author: John Vandenberg
Message: nose related script tests updates
In order for the script tests to run under nose, they must not
unexpectedly pass. A few scripts have been fixed recently, and
their status not updated in script_tests.py
Allow exit codes 1 and 2, as exit code 2 is used by argparse to
indicate a problem with the command line options, such as too
few options as occurs with replicate_wiki, and exit code 1 is used
by sys.exit called with a string as occurs in lonelypages.
Also some script fixes:
casechecker: dont use stdout to report script completion
states_redirect and flickripper: set exit code to 1 if deps fail
watchlist: Use APISite.login instead of deprecated forceLogin
nowcommons: use SHA1 instead of MD5
Change-Id: I7eda163b63151ea5fc90bbf7ba1e4adf4b7181c5
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/37a9ea87ba4b...1d0f94cd…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/43425055
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications
jenkins-bot has submitted this change and it was merged.
Change subject: nose related script tests updates
......................................................................
nose related script tests updates
In order for the script tests to run under nose, they must not
unexpectedly pass. A few scripts have been fixed recently, and
their status not updated in script_tests.py
Allow exit codes 1 and 2, as exit code 2 is used by argparse to
indicate a problem with the command line options, such as too
few options as occurs with replicate_wiki, and exit code 1 is used
by sys.exit called with a string as occurs in lonelypages.
Also some script fixes:
casechecker: dont use stdout to report script completion
states_redirect and flickripper: set exit code to 1 if deps fail
watchlist: Use APISite.login instead of deprecated forceLogin
nowcommons: use SHA1 instead of MD5
Change-Id: I7eda163b63151ea5fc90bbf7ba1e4adf4b7181c5
---
M scripts/casechecker.py
M scripts/flickrripper.py
M scripts/nowcommons.py
M scripts/states_redirect.py
M scripts/watchlist.py
M tests/script_tests.py
6 files changed, 12 insertions(+), 15 deletions(-)
Approvals:
John Vandenberg: Looks good to me, but someone else must approve
XZise: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/casechecker.py b/scripts/casechecker.py
index 89347ca..cc9350a 100644
--- a/scripts/casechecker.py
+++ b/scripts/casechecker.py
@@ -341,7 +341,6 @@
batchStart:batchStart + batchSize]
for data in self.RunQuery(self.queryParams):
self.ProcessDataBlock(data)
- print("*" * 29 + " Done")
except:
pywikibot.output(u'Exception at Title = %s, Next = %s'
% (self.currentTitle, self.apfrom))
diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py
index f1bdf28..cad7b1d 100644
--- a/scripts/flickrripper.py
+++ b/scripts/flickrripper.py
@@ -71,7 +71,7 @@
'This script requires ImageTk from the Python Imaging Library (PIL).\n'
'See: https://www.mediawiki.org/wiki/Manual:Pywikibot/flickrripper.py')
print(e)
- sys.exit()
+ sys.exit(1)
try:
import flickrapi # see: http://stuvel.eu/projects/flickrapi
@@ -79,7 +79,7 @@
print('This script requires the python flickrapi module. \n'
'See: http://stuvel.eu/projects/flickrapi')
print(e)
- sys.exit()
+ sys.exit(1)
import pywikibot
diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py
index 7d27c71..a016b3d 100644
--- a/scripts/nowcommons.py
+++ b/scripts/nowcommons.py
@@ -8,7 +8,7 @@
Files are downloaded and compared. If the files match, it can be deleted on
the source wiki. If multiple versions of the file exist, the script will not
-delete. If the MD5 comparison is not equal, the script will not delete.
+delete. If the SHA1 comparison is not equal, the script will not delete.
A sysop account on the local wiki is required if you want all features of
this script to work properly.
@@ -325,7 +325,7 @@
if localImagePage.fileIsShared():
pywikibot.output(u'File is already on Commons.')
continue
- md5 = localImagePage.getFileMd5Sum()
+ sha1 = localImagePage.getFileSHA1Sum()
if self.getOption('use_hash'):
filenameOnCommons = images_list[1]
else:
@@ -395,7 +395,7 @@
% localImagePage.title(withNamespace=False))
commonsText = commonsImagePage.get()
if self.getOption('replaceonly') is False:
- if md5 == commonsImagePage.getFileMd5Sum():
+ if sha1 == commonsImagePage.getFileSHA1Sum():
pywikibot.output(
u'The image is identical to the one on Commons.')
if len(localImagePage.getFileVersionHistory()) > 1 and not self.getOption('use_hash'):
diff --git a/scripts/states_redirect.py b/scripts/states_redirect.py
index 1bf5d5c..2ec6898 100644
--- a/scripts/states_redirect.py
+++ b/scripts/states_redirect.py
@@ -34,7 +34,7 @@
pywikibot.error('This script requires the python-pycountry module')
pywikibot.error('See: https://pypi.python.org/pypi/pycountry')
pywikibot.exception()
- sys.exit()
+ sys.exit(1)
msg = {
'en': 'Creating state abbreviation redirect',
diff --git a/scripts/watchlist.py b/scripts/watchlist.py
index ffa7803..31d1dcf 100755
--- a/scripts/watchlist.py
+++ b/scripts/watchlist.py
@@ -56,7 +56,7 @@
def refresh(site, sysop=False):
"""Fetch the watchlist."""
if not site.logged_in(sysop=sysop):
- site.forceLogin(sysop=sysop)
+ site.login(sysop=sysop)
params = {
'action': 'query',
diff --git a/tests/script_tests.py b/tests/script_tests.py
index a276593..06f3df7 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -303,7 +303,7 @@
if error:
self.assertIn(error, result['stderr'])
- self.assertIn(result['exit_code'], [0, -9])
+ self.assertIn(result['exit_code'], [0, 1, 2, -9])
else:
if stderr_other == ['']:
stderr_other = None
@@ -335,7 +335,8 @@
# Specifically look for deprecated
self.assertNotIn('deprecated', result['stdout'].lower())
# But also complain if there is any stdout
- if result['stdout'] == '':
+ # but ignore shell.py emiting a prompt
+ if result['stdout'] in ['', '>>> ']:
result['stdout'] = None
self.assertIsNone(result['stdout'])
@@ -356,7 +357,6 @@
dct[test_name] = test_execution(script_name, ['-help'])
if script_name in ['version',
'data_ingestion', # bug 68611
- 'replicate_wiki', # bug 68664
'script_wui', # Failing on travis-ci
] + failed_dep_script_list:
dct[test_name] = unittest.expectedFailure(dct[test_name])
@@ -383,13 +383,11 @@
'checkimages', # bug 68613
'data_ingestion', # bug 68611
'flickrripper', # Requires a flickr api key
- 'lonelypages', # custom return codes
- 'nowcommons', # deprecation warning
- 'replicate_wiki', # custom return codes
+ 'lonelypages', # uses exit code 1
'script_wui', # Error on any user except DrTrigonBot
'upload', # raises custom ValueError
] + failed_dep_script_list or (
- ((config.family != 'wikipedia' or config.mylang != 'en') and script_name == 'cfd') or
+ (config.family != 'wikipedia' and script_name == 'lonelypages') or
(config.family == 'wikipedia' and script_name == 'disambredir') or
(config.family == 'wikipedia' and config.mylang != 'en' and script_name == 'misspelling')):
dct[test_name] = unittest.expectedFailure(dct[test_name])
--
To view, visit https://gerrit.wikimedia.org/r/178185
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7eda163b63151ea5fc90bbf7ba1e4adf4b7181c5
Gerrit-PatchSet: 5
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>
Build Update for jayvdb/pywikibot-core
-------------------------------------
Build: #147
Status: Still Failing
Duration: 33 minutes and 42 seconds
Commit: 1d0f94c (test-scripts-update)
Author: John Vandenberg
Message: nose related script tests updates
In order for the script tests to run under nose, they must not
unexpectedly pass. A few scripts have been fixed recently, and
their status not updated in script_tests.py
Allow exit codes 1 and 2, as exit code 2 is used by argparse to
indicate a problem with the command line options, such as too
few options as occurs with replicate_wiki, and exit code 1 is used
by sys.exit called with a string as occurs in lonelypages.
Also some script fixes:
casechecker: dont use stdout to report script completion
states_redirect and flickripper: set exit code to 1 if deps fail
watchlist: Use APISite.login instead of deprecated forceLogin
nowcommons: use SHA1 instead of MD5
Change-Id: I7eda163b63151ea5fc90bbf7ba1e4adf4b7181c5
View the changeset: https://github.com/jayvdb/pywikibot-core/compare/58fd995ac73e^...1d0f94cdcc…
View the full build log and details: https://travis-ci.org/jayvdb/pywikibot-core/builds/43419338
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications
Build Update for jayvdb/pywikibot-core
-------------------------------------
Build: #145
Status: Failed
Duration: 45 minutes and 28 seconds
Commit: a823c68 (test-scripts-update)
Author: John Vandenberg
Message: nose related script tests updates
In order for the script tests to run under nose, they must not
unexpectedly pass. A few scripts have been fixed recently, and
their status not updated in script_tests.pyargparse uses exit
Allow exit codes 1 and 2, as exit code 2 is used by argparse to
indicate a problem with the command line options, such as too
few options as occurs with replicate_wiki, and exit code 1 is used
by sys.exit called with a string as occurs in lonelypages.
Also some script fixes:
casechecker: dont use stdout to report script completion
states_redirect and flickripper: set exit code to 1 if deps fail
watchlist: Use APISite.login instead of deprecated forceLogin
nowcommons: use SHA1 instead of MD5
Change-Id: I7eda163b63151ea5fc90bbf7ba1e4adf4b7181c5
View the changeset: https://github.com/jayvdb/pywikibot-core/compare/58fd995ac73e^...a823c68263…
View the full build log and details: https://travis-ci.org/jayvdb/pywikibot-core/builds/43413731
--
You can configure recipients for build notifications in your .travis.yml file. See http://docs.travis-ci.com/user/notifications