Page MenuHomePhabricator

test_watch of page_tests.TestPageUserAction.test_watch often fails
Closed, ResolvedPublic

Description

Probably the watchlist is updated lazily.

======================================================================
FAIL: test_watch (tests.page_tests.TestPageUserAction.test_watch)
Test Page.watch, with and without unwatch enabled.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/pywikibot/pywikibot/tests/page_tests.py", line 1109, in test_watch
    self.assertNotIn(userpage, userpage.site.watched_pages(**wp_params))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: User('User:Pywikibot-test') unexpectedly found in <pywikibot.data.api._generators.PageGenerator object at 0x7effea9af150>

Details

Event Timeline

Xqt triaged this task as High priority.Sat, Nov 8, 12:03 PM

Change #1203202 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] tests: increase wait time for watchlist test

https://gerrit.wikimedia.org/r/1203202

Xqt claimed this task.

Change #1203202 merged by jenkins-bot:

[pywikibot/core@master] tests: increase wait time for watchlist test

https://gerrit.wikimedia.org/r/1203202