jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Tests: Require user for edit failures
......................................................................
[FIX] Tests: Require user for edit failures
Change-Id: I16d8fec2878fcd2d8f5dcbd7045073a029f1687f
---
M tests/edit_failure_tests.py
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/edit_failure_tests.py b/tests/edit_failure_tests.py
index fa3c1db..a13c330 100644
--- a/tests/edit_failure_tests.py
+++ b/tests/edit_failure_tests.py
@@ -29,6 +29,7 @@
"""Test cases for edits which should fail to save."""
+ user = True
write = -1
family = 'wikipedia'
@@ -57,6 +58,7 @@
"""Test cases for actions which should fail to save."""
+ user = True
write = -1
family = 'wikipedia'
@@ -89,6 +91,7 @@
family = 'wikidata'
code = 'test'
+ user = True
write = -1
def test_itempage_save(self):
--
To view, visit https://gerrit.wikimedia.org/r/201933
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I16d8fec2878fcd2d8f5dcbd7045073a029f1687f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
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: jenkins-bot <>
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #2086
Status: Passed
Duration: 28 minutes and 26 seconds
Commit: bc4ee80 (master)
Author: Antoine Musso
Message: test: disable l10n tests when i18n is missing
Using a fresh clone of pywikibot/core without any submodules, the
l10n_tests module raises an exception because it can not find the i18n
checkout.
Skip the l10n_tests module entirely when i18n messages are not present.
Change-Id: I1ee9e80ca727676c2f7067c2b82bfcb71e68301d
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/c3e31d4ebabf...bc4ee802…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/57202221
--
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: test: disable l10n tests when i18n is missing
......................................................................
test: disable l10n tests when i18n is missing
Using a fresh clone of pywikibot/core without any submodules, the
l10n_tests module raises an exception because it can not find the i18n
checkout.
Skip the l10n_tests module entirely when i18n messages are not present.
Change-Id: I1ee9e80ca727676c2f7067c2b82bfcb71e68301d
---
M pywikibot/i18n.py
M tests/__init__.py
2 files changed, 4 insertions(+), 0 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py
index 2da6de8..10f01c9 100644
--- a/pywikibot/i18n.py
+++ b/pywikibot/i18n.py
@@ -301,6 +301,7 @@
def _get_messages_bundle(name):
"""Load all translation messages for a bundle name."""
exception_message = 'Unknown problem'
+ transdict = {}
with warnings.catch_warnings():
# Ignore 'missing __init__.py' as import looks at the JSON
diff --git a/tests/__init__.py b/tests/__init__.py
index 83ad585..96672a4 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -32,6 +32,7 @@
import unittest
from pywikibot import config
+from pywikibot import i18n
import pywikibot.data.api
from pywikibot.data.api import Request as _original_Request
from pywikibot.data.api import CachedRequest
@@ -90,6 +91,8 @@
disabled_test_modules = [
'tests', # tests of the tests package
]
+if not i18n.messages_available():
+ disabled_test_modules.append('l10n')
disabled_tests = {
'textlib': [
--
To view, visit https://gerrit.wikimedia.org/r/201911
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1ee9e80ca727676c2f7067c2b82bfcb71e68301d
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Hashar <hashar(a)free.fr>
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: Siebrand <siebrand(a)kitano.nl>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: Improve script documentation
......................................................................
Improve script documentation
Change-Id: If64b3a676cc88041fe79217ac31d50c62f0d9c81
---
M scripts/create_categories.py
1 file changed, 6 insertions(+), 2 deletions(-)
Approvals:
XZise: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/create_categories.py b/scripts/create_categories.py
index 90f2536..b3d0f59 100755
--- a/scripts/create_categories.py
+++ b/scripts/create_categories.py
@@ -2,8 +2,8 @@
"""
Program to batch create categories.
-The program expects a generator containing a list of page titles to be used as
-base.
+The program expects a generator of page titles to be used as
+suffix for creating new categories with a different base.
The following command line parameters are supported:
@@ -23,6 +23,10 @@
-parent:"Cultural heritage monuments in Wallonia"
-basename:"Cultural heritage monuments in"
+The page 'User:Multichill/Wallonia' on commons contains
+page links like [[Category:Hensies]], causing this script
+to create [[Category:Cultural heritage monuments in Hensies]].
+
"""
__version__ = '$Id$'
#
--
To view, visit https://gerrit.wikimedia.org/r/201408
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If64b3a676cc88041fe79217ac31d50c62f0d9c81
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: 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 <>
jenkins-bot has submitted this change and it was merged.
Change subject: BREAKING: make APISite.has_extension() case-sensitive
......................................................................
BREAKING: make APISite.has_extension() case-sensitive
MediaWiki handles extension names case-sensitively,
in fact some extensions' names only differ in capitalization:
* https://www.mediawiki.org/wiki/Extension:BootStraphttps://www.mediawiki.org/wiki/Extension:Bootstrap
* https://www.mediawiki.org/wiki/Extension:WikiTeXhttps://www.mediawiki.org/wiki/Extension:WikiTex
TestSiteExtensions.testExtensions() has been updated accordingly.
Note:
the now deprecated hasExtension() method has behaved case-insensitively
since Merlijn van Deen's commit 149a90bfc0f53996ff6e6201e7ec0233cb2d78b1.
It has been kept case insensitive.
Change-Id: I1d7aeaac0391693bb5a4b1a229205fabf3bba7e2
---
M pywikibot/site.py
M tests/site_tests.py
2 files changed, 9 insertions(+), 4 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
XZise: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 457a917..5aa5969 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2167,20 +2167,25 @@
if unknown is not None:
pywikibot.debug(u'unknown argument of hasExtension is deprecated.',
_logger)
- return self.has_extension(name)
+ extensions = self.siteinfo['extensions']
+ name = name.lower()
+ for ext in extensions:
+ if ext['name'].lower() == name:
+ return True
+ return False
@need_version("1.14")
def has_extension(self, name):
"""Determine whether extension `name` is loaded.
- @param name: The extension to check for, case insensitive
+ @param name: The extension to check for, case sensitive
@type name: str
@return: If the extension is loaded
@rtype: bool
"""
extensions = self.siteinfo['extensions']
for ext in extensions:
- if ext['name'].lower() == name.lower():
+ if ext['name'] == name:
return True
return False
diff --git a/tests/site_tests.py b/tests/site_tests.py
index 322f1ef..ffc18a9 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -1531,7 +1531,7 @@
self.assertTrue(mysite.has_extension('Disambiguator'))
# test case-sensitivity
- self.assertTrue(mysite.has_extension('disambiguator'))
+ self.assertFalse(mysite.has_extension('disambiguator'))
self.assertFalse(mysite.has_extension('ThisExtensionDoesNotExist'))
--
To view, visit https://gerrit.wikimedia.org/r/178699
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1d7aeaac0391693bb5a4b1a229205fabf3bba7e2
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <ricordisamoa(a)openmailbox.org>
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: Multichill <maarten(a)mdammers.nl>
Gerrit-Reviewer: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>