jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/789895 )
Change subject: [7.2.1] Fix argument parsing in movepages.py ...................................................................... [7.2.1] Fix argument parsing in movepages.py Fix regression of 68bc18c4acabc3c29ab33c83b63bef8ebc030b92 - Backport from master branch - fix some tests Bug: T307826 Change-Id: Iba8a9e879b63ff387b4a0de0dcc6ecd5cf0cf6dd --- M pywikibot/__metadata__.py M scripts/movepages.py M setup.py M tests/file_tests.py 4 files changed, 12 insertions(+), 12 deletions(-) Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/__metadata__.py b/pywikibot/__metadata__.py index a4fffeb..43052d7 100644 --- a/pywikibot/__metadata__.py +++ b/pywikibot/__metadata__.py @@ -11,7 +11,7 @@ __name__ = 'pywikibot' -__version__ = '7.2.0' +__version__ = '7.2.1' __description__ = 'Python MediaWiki Bot Framework' __maintainer__ = 'The Pywikibot team' __maintainer_email__ = '[email protected]' diff --git a/scripts/movepages.py b/scripts/movepages.py index 118dc9c..1ce8d91 100755 --- a/scripts/movepages.py +++ b/scripts/movepages.py @@ -197,7 +197,7 @@ for arg in local_args: opt, _, value = arg.partition(':') - if opt.startswith('-'): + if not opt.startswith('-'): continue opt = opt[1:] if opt == 'pairsfile': diff --git a/setup.py b/setup.py index 25715ac..dad8543 100755 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ 'flake8-comprehensions>=2.2.0; python_version < "3.8"', 'flake8-docstrings>=1.3.1', 'flake8-mock>=0.3', - 'flake8-print>=2.0.1', + 'flake8-print>=2.0.1,<5.0.0', 'flake8-quotes>=2.0.1', 'flake8-string-format', 'flake8-tuple>=0.2.8', diff --git a/tests/file_tests.py b/tests/file_tests.py index 001a40c..49c9997 100755 --- a/tests/file_tests.py +++ b/tests/file_tests.py @@ -106,24 +106,24 @@ page_doesnt_exist_exc_regex): commons_file.get() - def testOnBoth(self): + def test_on_both(self): """Test file_is_shared() on file page with local and shared file.""" - title = 'File:Pulsante spam.png' + title = 'Pywikibot MW gear icon.svg' commons = self.get_site('commons') - itwp = self.get_site('itwiki') - itwp_file = pywikibot.FilePage(itwp, title) - for using in itwp_file.usingPages(): + testwp = self.get_site('testwiki') + testwp_file = pywikibot.FilePage(testwp, title) + for using in testwp_file.usingPages(): self.assertIsInstance(using, pywikibot.Page) commons_file = pywikibot.FilePage(commons, title) - self.assertTrue(itwp_file.get_file_url()) - self.assertTrue(itwp_file.exists()) + self.assertTrue(testwp_file.get_file_url()) + self.assertTrue(testwp_file.exists()) self.assertTrue(commons_file.exists()) - self.assertFalse(itwp_file.file_is_shared()) - self.assertTrue(itwp_file.file_is_used) + self.assertFalse(testwp_file.file_is_shared()) + self.assertTrue(testwp_file.file_is_used) self.assertTrue(commons_file.file_is_shared()) self.assertTrue(commons_file.file_is_used) -- To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/789895 To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings Gerrit-Project: pywikibot/core Gerrit-Branch: stable Gerrit-Change-Id: Iba8a9e879b63ff387b4a0de0dcc6ecd5cf0cf6dd Gerrit-Change-Number: 789895 Gerrit-PatchSet: 4 Gerrit-Owner: Xqt <[email protected]> Gerrit-Reviewer: D3r1ck01 <[email protected]> Gerrit-Reviewer: Vladis13 <[email protected]> Gerrit-Reviewer: Xqt <[email protected]> Gerrit-Reviewer: jenkins-bot Gerrit-MessageType: merged
_______________________________________________ Pywikibot-commits mailing list -- [email protected] To unsubscribe send an email to [email protected]
