Page MenuHomePhabricator

Subsequent tests fail after a dry test fail to set up
Open, LowPublic


I think when a dry test fails to set up that subsequent test also fail when they create a site instance and you get errors like:

ERROR: setUpClass (tests.deletionbot_tests.TestDeletionBotWrite)
Traceback (most recent call last):
  File "/home/xzise/Programms/pywikibot/core/tests/", line 578, in setUpClass
    super(RequireUserMixin, cls).setUpClass()
  File "/home/xzise/Programms/pywikibot/core/tests/", line 531, in setUpClass
    super(SiteWriteMixin, cls).setUpClass()
  File "/home/xzise/Programms/pywikibot/core/tests/", line 456, in setUpClass
    super(CheckHostnameMixin, cls).setUpClass()
  File "/home/xzise/Programms/pywikibot/core/tests/", line 830, in setUpClass
  File "/home/xzise/Programms/pywikibot/core/pywikibot/", line 604, in Site
    _sites[key] = interface(code=code, fam=fam, user=user, sysop=sysop)
  File "/home/xzise/Programms/pywikibot/core/tests/", line 377, in __init__
    % (fam, code))
pywikibot.exceptions.SiteDefinitionError: Loading site test:test during dry test not permitted

I need to further study that but when I did one test manually it worked fine but as soon as I did it in the test suite it errored with a similar message as above. Now that I've fixed that one place (tests.dry_api_tests.DryCachedRequestTests.setUp to be exact) the tests don't fail anymore.

Event Timeline

XZise created this task.Mar 21 2015, 2:58 PM
XZise raised the priority of this task from to Low.
XZise updated the task description. (Show Details)
XZise added projects: Pywikibot, Pywikibot-tests.
XZise added a subscriber: XZise.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptMar 21 2015, 2:58 PM
jayvdb moved this task from Backlog to Framework on the Pywikibot-tests board.Jun 9 2015, 6:26 AM