jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/341321 )
Change subject: [bugfix] long must be global ......................................................................
[bugfix] long must be global
Bug: T159700 Change-Id: I3817ec85830569b59a39e3a7710846d34654f16d --- M tests/site_tests.py 1 file changed, 4 insertions(+), 5 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/site_tests.py b/tests/site_tests.py index f784dbc..c4f1675 100644 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests for the site module.""" # -# (C) Pywikibot team, 2008-2016 +# (C) Pywikibot team, 2008-2017 # # Distributed under the terms of the MIT license. # @@ -46,6 +46,9 @@ ) from tests.basepage_tests import BasePageLoadRevisionsCachingTestBase from tests.utils import allowed_failure, allowed_failure_if, entered_loop + +if not PY2: + long = int # Must be global: T159700
class TokenTestBase(TestCaseBase): @@ -1162,10 +1165,6 @@
def test_logpages(self): """Test the deprecated site.logpages() method.""" - # pyflakes fix for Python 3 - if not PY2: - long = int - le = list(self.site.logpages(number=10)) self.assertOneDeprecation() self.assertLessEqual(len(le), 10)
pywikibot-commits@lists.wikimedia.org