jenkins-bot has submitted this change and it was merged.
Change subject: Fix ScriptTest metaclass super __new__
......................................................................
Fix ScriptTest metaclass super __new__
Attributes like 'user' and 'net' have not been set on script tests
as the metaclass did not invoke the super meta-classes' __new__.
Change-Id: Ied762af1fb2099a3fb4f906306068546ebb99606
---
M tests/script_tests.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
XZise: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/script_tests.py b/tests/script_tests.py
index f4252e3..39a783d 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -398,7 +398,7 @@
#
# dct[test_name].site = True
- return type.__new__(cls, name, bases, dct)
+ return super(TestScriptMeta, cls).__new__(cls, name, bases, dct)
class TestScript(DefaultSiteTestCase, PwbTestCase):
@@ -412,8 +412,8 @@
__metaclass__ = TestScriptMeta
def setUp(self):
- super(TestScript, self).setUp()
"""Prepare the environment for running the pwb.py
script."""
+ super(TestScript, self).setUp()
self.old_pywikibot_dir = None
if 'PYWIKIBOT2_DIR' in os.environ:
self.old_pywikibot_dir = os.environ['PYWIKIBOT2_DIR']
--
To view, visit
https://gerrit.wikimedia.org/r/171213
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ied762af1fb2099a3fb4f906306068546ebb99606
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>