jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1041125?usp=email )
Change subject: [tests] protection are given as 'infinite' instead 'infinity' in tests ......................................................................
[tests] protection are given as 'infinite' instead 'infinity' in tests
Change-Id: I5f6b174807864e4570f6a6affd4c63bd6613a9a5 --- M tests/page_tests.py M tests/site_tests.py 2 files changed, 11 insertions(+), 11 deletions(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/tests/page_tests.py b/tests/page_tests.py index ea4dfd8..07c4f0c 100755 --- a/tests/page_tests.py +++ b/tests/page_tests.py @@ -1139,8 +1139,8 @@ p1.protect(protections={'edit': 'sysop', 'move': 'autoconfirmed'}, reason='Pywikibot unit test') self.assertEqual(p1.protection(), - {'edit': ('sysop', 'infinity'), - 'move': ('autoconfirmed', 'infinity')}) + {'edit': ('sysop', 'infinite'), + 'move': ('autoconfirmed', 'infinite')})
p1.protect(protections={'edit': '', 'move': ''}, reason='Pywikibot unit test') @@ -1154,8 +1154,8 @@ p1.protect(protections={'edit': 'sysop', 'move': 'autoconfirmed'}, reason='Pywikibot unit test') self.assertEqual(p1.protection(), - {'edit': ('sysop', 'infinity'), - 'move': ('autoconfirmed', 'infinity')}) + {'edit': ('sysop', 'infinite'), + 'move': ('autoconfirmed', 'infinite')})
p1.protect(reason='Pywikibot unit test') self.assertEqual(p1.protection(), {}) @@ -1168,8 +1168,8 @@ p1.protect(protections={'edit': 'sysop', 'move': 'autoconfirmed'}, reason='Pywikibot unit test') self.assertEqual(p1.protection(), - {'edit': ('sysop', 'infinity'), - 'move': ('autoconfirmed', 'infinity')}) + {'edit': ('sysop', 'infinite'), + 'move': ('autoconfirmed', 'infinite')}) # workaround p1 = pywikibot.Page(site, 'User:Unicodesnowman/ProtectTest') p1.protect(protections={'edit': '', 'move': ''}, diff --git a/tests/site_tests.py b/tests/site_tests.py index 3933ae2..7dfa510 100755 --- a/tests/site_tests.py +++ b/tests/site_tests.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """Tests for the site module.""" # -# (C) Pywikibot team, 2008-2023 +# (C) Pywikibot team, 2008-2024 # # Distributed under the terms of the MIT license. # @@ -568,8 +568,8 @@ reason='Pywikibot unit test') self.assertIsNone(r) self.assertEqual(site.page_restrictions(page=p1), - {'edit': ('sysop', 'infinity'), - 'move': ('autoconfirmed', 'infinity')}) + {'edit': ('sysop', 'infinite'), + 'move': ('autoconfirmed', 'infinite')})
expiry = pywikibot.Timestamp.fromISOformat('2050-01-01T00:00:00Z') site.protect(protections={'edit': 'sysop', 'move': 'autoconfirmed'}, @@ -597,8 +597,8 @@ reason='Pywikibot unit test') self.assertIsNone(r) self.assertEqual(site.page_restrictions(page=p1), - {'edit': ('sysop', 'infinity'), - 'move': ('autoconfirmed', 'infinity')}) + {'edit': ('sysop', 'infinite'), + 'move': ('autoconfirmed', 'infinite')})
p1 = pywikibot.Page(site, 'User:Unicodesnowman/ProtectTest') expiry = pywikibot.Timestamp.fromISOformat('2050-01-01T00:00:00Z')
pywikibot-commits@lists.wikimedia.org