jenkins-bot has submitted this change and it was merged.
Change subject: TestCaseBase should inherit from unittest.TestCase ......................................................................
TestCaseBase should inherit from unittest.TestCase
All classes in the test aspect class heirachy should inherit from unittest.TestCase.
Fixing this slightly changes the MRU, but otherwise has no effect. It does allow better static and dynamic checking of the code.
Change-Id: I3a3c857c3a26bf70262926062d1e9f032a648ee9 --- M tests/aspects.py 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/aspects.py b/tests/aspects.py index b7a9b34..0f3b9f1 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -43,7 +43,7 @@ from tests import unittest, patch_request, unpatch_request
-class TestCaseBase(object): +class TestCaseBase(unittest.TestCase):
"""Base class for all tests."""
@@ -116,7 +116,7 @@ pywikibot.Site = self.old_Site_lookup_method
-class ForceCacheMixin(object): +class ForceCacheMixin(TestCaseBase):
"""Aggressively cached API test cases.
@@ -137,7 +137,7 @@ unpatch_request()
-class CacheInfoMixin(object): +class CacheInfoMixin(TestCaseBase):
"""Report cache hits and misses."""
@@ -387,7 +387,7 @@ return super(MetaTestCaseClass, cls).__new__(cls, name, bases, dct)
-class TestCase(TestTimerMixin, TestCaseBase, unittest.TestCase): +class TestCase(TestTimerMixin, TestCaseBase):
"""Run tests on multiple sites."""