Page MenuHomePhabricator

Suppress and assert against bot logs
Open, Needs TriagePublic


Our unit tests dump ~536 lines to stdout because bots print their logs. This verbosity makes it difficult to glean important information from our test output.

This adds a bot_log contextmanager to capture bot logs and let us assert about their content. This has a couple advantages...

  1. Less verbose test output.
  2. Better test coverage by ensuring our bots emit the right output.

If you like this direction I'll do the same for our other tests, but first I need to confirm that the project owner approves of this.

Event Timeline

Change 678644 had a related patch set uploaded (by Damian; author: Damian):

[pywikibot/core@master] [tests] Suppress and check replacebot logs

Change 678644 merged by jenkins-bot:

[pywikibot/core@master] [tests] Suppress and check replacebot logs