[blivet:master 06/11] Use correct parameters in __init__() in subclasses of unittest.TestCase.
mulhern
amulhern at redhat.com
Tue Jun 17 15:07:57 UTC 2014
Can get away with using *args, **kwargs, but it is not helpful.
Signed-off-by: mulhern <amulhern at redhat.com>
---
tests/devicelibs_test/baseclass.py | 4 ++--
tests/devicelibs_test/btrfs_test.py | 4 ++--
tests/devicelibs_test/crypto_test.py | 4 ++--
tests/devicelibs_test/lvm_test.py | 4 ++--
tests/devicelibs_test/mdraid_test.py | 4 ++--
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/tests/devicelibs_test/baseclass.py b/tests/devicelibs_test/baseclass.py
index ae24571..9b3d991 100644
--- a/tests/devicelibs_test/baseclass.py
+++ b/tests/devicelibs_test/baseclass.py
@@ -69,8 +69,8 @@ class DevicelibsTestCase(unittest.TestCase):
_LOOP_DEVICES = ["/tmp/test-virtdev0", "/tmp/test-virtdev1"]
- def __init__(self, *args, **kwargs):
- unittest.TestCase.__init__(self, *args, **kwargs)
+ def __init__(self, methodName='runTest'):
+ unittest.TestCase.__init__(self, methodName=methodName)
self._loopMap = {}
def setUp(self):
diff --git a/tests/devicelibs_test/btrfs_test.py b/tests/devicelibs_test/btrfs_test.py
index f42c9be..b01720b 100755
--- a/tests/devicelibs_test/btrfs_test.py
+++ b/tests/devicelibs_test/btrfs_test.py
@@ -15,8 +15,8 @@ class BTRFSMountDevice(baseclass.DevicelibsTestCase):
It must create the filesystem on its chosen devices before mounting.
It always mounts the filesystem using self.device at self.mountpoint.
"""
- def __init__(self, *args, **kwargs):
- baseclass.DevicelibsTestCase.__init__(self, *args, **kwargs)
+ def __init__(self, methodName='runTest'):
+ super(BTRFSMountDevice, self).__init__(methodName=methodName)
self.device = None
self.mountpoint = None
diff --git a/tests/devicelibs_test/crypto_test.py b/tests/devicelibs_test/crypto_test.py
index 40bee22..e37df15 100755
--- a/tests/devicelibs_test/crypto_test.py
+++ b/tests/devicelibs_test/crypto_test.py
@@ -131,9 +131,9 @@ class CryptoTestCase(baseclass.DevicelibsTestCase):
class CryptoTestCase2(baseclass.DevicelibsTestCase):
- def __init__(self, *args, **kwargs):
+ def __init__(self, methodName='runTest'):
"""Set up the names by which luks knows these devices."""
- super(CryptoTestCase2, self).__init__(*args, **kwargs)
+ super(CryptoTestCase2, self).__init__(methodName=methodName)
self._names = { self._LOOP_DEVICES[0]: "crypted",
self._LOOP_DEVICES[1]: "encrypted" }
diff --git a/tests/devicelibs_test/lvm_test.py b/tests/devicelibs_test/lvm_test.py
index c368e68..1c941ea 100755
--- a/tests/devicelibs_test/lvm_test.py
+++ b/tests/devicelibs_test/lvm_test.py
@@ -33,9 +33,9 @@ class LVMTestCase(unittest.TestCase):
class LVMAsRootTestCase(baseclass.DevicelibsTestCase):
- def __init__(self, *args, **kwargs):
+ def __init__(self, methodName='runTest'):
"""Set up the structure of the volume group."""
- super(LVMAsRootTestCase, self).__init__(*args, **kwargs)
+ super(LVMAsRootTestCase, self).__init__(methodName=methodName)
self._vg_name = "test-vg"
self._lv_name = "test-lv"
diff --git a/tests/devicelibs_test/mdraid_test.py b/tests/devicelibs_test/mdraid_test.py
index 52db583..b0a100b 100755
--- a/tests/devicelibs_test/mdraid_test.py
+++ b/tests/devicelibs_test/mdraid_test.py
@@ -51,9 +51,9 @@ class MDRaidTestCase(unittest.TestCase):
class MDRaidAsRootTestCase(baseclass.DevicelibsTestCase):
- def __init__(self, *args, **kwargs):
+ def __init__(self, methodName='runTest'):
"""Set up the structure of the mdraid array."""
- super(MDRaidAsRootTestCase, self).__init__(*args, **kwargs)
+ super(MDRaidAsRootTestCase, self).__init__(methodName=methodName)
self._dev_name = "/dev/md0"
def tearDown(self):
--
1.9.3
More information about the anaconda-patches
mailing list