jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/483721 )
Change subject: [tests] Allow multiple options for script_tests.py
......................................................................
[tests] Allow multiple options for script_tests.py
Currently we only use "-help" and "-simulate" options for script tests.
But we also could do more tests e.g. with generators like
"-simulate -page:Main Page" in future. Therefore the TestScriptMeta
must accept an option string with more than one option.
Change-Id: I717118a0b55b813b4ac2574af72ceb177241ecc1
---
M tests/script_tests.py
1 file changed, 6 insertions(+), 6 deletions(-)
Approvals:
Dvorapa: Looks good to me, but someone else must approve
D3r1ck01: Looks good to me, but someone else must approve
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/script_tests.py b/tests/script_tests.py
index edf66b4..354e531 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""Test that each script can be compiled and executed."""
#
-# (C) Pywikibot team, 2014-2018
+# (C) Pywikibot team, 2014-2019
#
# Distributed under the terms of the MIT license.
#
@@ -330,7 +330,7 @@
return test_skip_script
return testScript
- argument = '-' + dct['_argument']
+ arguments = dct['_arguments']
for script_name in script_list:
# force login to be the first, alphabetically, so the login
@@ -344,9 +344,9 @@
test_name = 'test_' + script_name
cls.add_method(dct, test_name,
- test_execution(script_name, [argument]),
+ test_execution(script_name, arguments.split()),
'Test running {} {}.'
- .format(script_name, argument))
+ .format(script_name, arguments))
if script_name in dct['_expected_failures']:
dct[test_name] = unittest.expectedFailure(dct[test_name])
@@ -385,7 +385,7 @@
_expected_failures.discard('weblinkchecker')
_allowed_failures = []
- _argument = 'help'
+ _arguments = '-help'
_results = None
@@ -417,7 +417,7 @@
'lonelypages', # T94680: uses exit code 1
]
- _argument = 'simulate'
+ _arguments = '-simulate'
_results = no_args_expected_results
--
To view, visit https://gerrit.wikimedia.org/r/483721
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I717118a0b55b813b4ac2574af72ceb177241ecc1
Gerrit-Change-Number: 483721
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: D3r1ck01 <alangiderick(a)gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/484350 )
Change subject: Revert "[tests] Install oauthlib<3.0.0 first"
......................................................................
Revert "[tests] Install oauthlib<3.0.0 first"
Does not work as expected
This reverts commit 2073bd3470b4da85a50ec09419bc4c32be7beef7.
Change-Id: Iae86507b7a33cbdd17580fdfdeb479db98df457a
---
M requirements.txt
1 file changed, 0 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/requirements.txt b/requirements.txt
index c52d3e2..551d858 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -31,9 +31,6 @@
# OAuth support
# mwoauth 0.2.4 is needed because it supports getting identity information
# about the user
-# due to T213635 we have to install oauthlib first
-# because requests-oauthlib 1.1.0 and lower does not support oauthlib 3.0.0
-oauthlib<3.0.0
mwoauth>=0.2.4,!=0.3.1
# core interwiki_graph.py:
--
To view, visit https://gerrit.wikimedia.org/r/484350
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iae86507b7a33cbdd17580fdfdeb479db98df457a
Gerrit-Change-Number: 484350
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: D3r1ck01 <alangiderick(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot (75)
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/467947 )
Change subject: [IMPR] parse global args before local args
......................................................................
[IMPR] parse global args before local args
detached from I4ef9009c91
Change-Id: Ieac88faba37a7caa76f1b3ee49847e5a53dba2a4
---
M scripts/patrol.py
1 file changed, 4 insertions(+), 5 deletions(-)
Approvals:
D3r1ck01: Looks good to me, but someone else must approve
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/patrol.py b/scripts/patrol.py
index e72e7ad..6cf8b76 100755
--- a/scripts/patrol.py
+++ b/scripts/patrol.py
@@ -446,11 +446,13 @@
recentchanges = False
newpages = False
repeat = False
- gen_factory = pagegenerators.GeneratorFactory()
options = {}
# Parse command line arguments
- for arg in pywikibot.handle_args(args):
+ local_args = pywikibot.handle_args(args)
+ site = pywikibot.Site()
+ gen_factory = pagegenerators.GeneratorFactory(site)
+ for arg in local_args:
if arg.startswith('-ask'):
options['ask'] = True
elif arg.startswith('-autopatroluserns'):
@@ -475,9 +477,6 @@
m = arg.split(':')
options[m[0]] = m[1]
- site = pywikibot.Site()
- site.login()
-
if usercontribs:
user = pywikibot.User(site, usercontribs)
if user.isAnonymous() or user.isRegistered():
--
To view, visit https://gerrit.wikimedia.org/r/467947
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieac88faba37a7caa76f1b3ee49847e5a53dba2a4
Gerrit-Change-Number: 467947
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: D3r1ck01 <alangiderick(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)