John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/167996

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/96/167996/1

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."""
 

-- 
To view, visit https://gerrit.wikimedia.org/r/167996
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a3c857c3a26bf70262926062d1e9f032a648ee9
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to