[blivet:master 06/12] Remove pointless parameters from unittest methods.

mulhern amulhern at redhat.com
Mon Apr 28 22:26:44 UTC 2014


These methods are called by the unittest framework which can never
make any use of these parameters.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 tests/action_test.py  | 12 ++++++------
 tests/devices_test.py |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/action_test.py b/tests/action_test.py
index f2722c9..35decb5 100644
--- a/tests/action_test.py
+++ b/tests/action_test.py
@@ -86,7 +86,7 @@ class DeviceActionTestCase(StorageTestCase):
                                         exists=True)
         self.storage.devicetree._addDevice(lv_swap)
 
-    def testActions(self, *args, **kwargs):
+    def testActions(self):
         """ Verify correct management of actions.
 
             - action creation/registration/cancellation
@@ -184,7 +184,7 @@ class DeviceActionTestCase(StorageTestCase):
         fmt = self.newFormat("ext4", mountpoint="/boot", device=sda1.path)
         self.scheduleCreateFormat(device=sda1, format=fmt)
 
-    def testActionCreation(self, *args, **kwargs):
+    def testActionCreation(self):
         """ Verify correct operation of action class constructors. """
         # instantiation of device resize action for non-existent device should
         # fail
@@ -255,7 +255,7 @@ class DeviceActionTestCase(StorageTestCase):
         self.assertEqual(lv_swap.format, new_format)
         lv_swap.format = orig_format
 
-    def testActionRegistration(self, *args, **kwargs):
+    def testActionRegistration(self):
         """ Verify correct operation of action registration and cancelling. """
         # self.setUp has just been run, so we should have something like
         # a preexisting autopart config in the devicetree.
@@ -337,7 +337,7 @@ class DeviceActionTestCase(StorageTestCase):
         sdd1 = self.storage.devicetree.getDeviceByName("sdd1")
         self.assertNotEqual(sdd1, None)
 
-    def testActionObsoletes(self, *args, **kwargs):
+    def testActionObsoletes(self):
         """ Verify correct operation of DeviceAction.obsoletes. """
         self.destroyAllDevices(disks=["sdc"])
         sdc = self.storage.devicetree.getDeviceByName("sdc")
@@ -455,7 +455,7 @@ class DeviceActionTestCase(StorageTestCase):
         self.assertEqual(destroy_sda1.obsoletes(destroy_sda1), False)
         self.assertEqual(destroy_sda1.obsoletes(destroy_sda1_format), False)
 
-    def testActionPruning(self, *args, **kwargs):
+    def testActionPruning(self):
         """ Verify correct functioning of action pruning. """
         self.destroyAllDevices()
 
@@ -551,7 +551,7 @@ class DeviceActionTestCase(StorageTestCase):
         sda3_actions = self.storage.devicetree.findActions(sda3.id)
         self.assertEqual(len(sda3_actions), 0)
 
-    def testActionDependencies(self, *args, **kwargs):
+    def testActionDependencies(self):
         """ Verify correct functioning of action dependencies. """
         # ActionResizeDevice
         # an action that shrinks a device should require the action that
diff --git a/tests/devices_test.py b/tests/devices_test.py
index e9e95d5..02e3d72 100644
--- a/tests/devices_test.py
+++ b/tests/devices_test.py
@@ -229,7 +229,7 @@ class MDRaidArrayDeviceTestCase(DeviceStateTestCase):
            totalDevices=5)
 
 
-    def testMDRaidArrayDeviceInit(self, *args, **kwargs):
+    def testMDRaidArrayDeviceInit(self):
         """Tests the state of a MDRaidArrayDevice after initialization.
            For some combinations of arguments the initializer will throw
            an exception.
@@ -421,7 +421,7 @@ class MDRaidArrayDeviceTestCase(DeviceStateTestCase):
                                 memberDevices=2)
 
 
-    def testMDRaidArrayDeviceMethods(self, *args, **kwargs):
+    def testMDRaidArrayDeviceMethods(self):
         """Test for method calls on initialized MDRaidDevices."""
         with self.assertRaisesRegexp(MDRaidError, "invalid RAID level" ):
             self.dev7.level = "junk"
@@ -473,7 +473,7 @@ class BTRFSDeviceTestCase(DeviceStateTestCase):
         self.dev3 = BTRFSVolumeDevice("dev3",
            parents=[dev])
 
-    def testBTRFSDeviceInit(self, *args, **kwargs):
+    def testBTRFSDeviceInit(self):
         """Tests the state of a BTRFSDevice after initialization.
            For some combinations of arguments the initializer will throw
            an exception.
@@ -507,7 +507,7 @@ class BTRFSDeviceTestCase(DeviceStateTestCase):
            BTRFSSubVolumeDevice,
            "dev1", parents=parents)
 
-    def testBTRFSDeviceMethods(self, *args, **kwargs):
+    def testBTRFSDeviceMethods(self):
         """Test for method calls on initialized BTRFS Devices."""
         # volumes do not have ancestor volumes
         with self.assertRaises(AttributeError):
-- 
1.8.3.1



More information about the anaconda-patches mailing list