https://bugzilla.wikimedia.org/show_bug.cgi?id=72885
Bug ID: 72885
Summary: Dry tests aren't dry without explicit "dry = True"
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: tests
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: CommodoreFabianus(a)gmx.de
Web browser: ---
Mobile Platform: ---
Unless a test is explicitly defined with "dry = True" it won't be in “dry”
mode. For example
https://gerrit.wikimedia.org/r/170577 couldn't work when dry,
as it then needs to be set source explicitly:
ERROR: test_valid (tests.link_tests.TestLink)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/xzise/Programms/core/tests/link_tests.py", line 33, in test_valid
self.assertEqual(Link('Sandbox').title, 'Sandbox')
File "/home/xzise/Programms/core/pywikibot/page.py", line 3972, in __init__
self._source = source or pywikibot.Site()
File "/home/xzise/Programms/core/pywikibot/__init__.py", line 573, in Site
_sites[key] = interface(code=code, fam=fam, user=user, sysop=sysop)
File "/home/xzise/Programms/core/tests/aspects.py", line 266, in __init__
% (fam, code))
SiteDefinitionError: Loading site test:test during dry test not permitted
As nose executes dry test it shouldn't have passed jenkins. Because the test
worked on Travis (
https://travis-ci.org/wikimedia/pywikibot-core/jobs/39753290#L549 ) so it's
probably not related to jenkins, tox or nose.
Querying 'self.dry' inside a test returned True so it's not like it
doesn't set
anything.
--
You are receiving this mail because:
You are the assignee for the bug.