VirtualBox

Ignore:
Timestamp:
Jun 11, 2019 11:58:28 AM (6 years ago)
Author:
vboxsync
Message:

ValKit: New pylint version - cleanup in progress.

Location:
trunk/src/VBox/ValidationKit/tests/storage
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/storage/remoteexecutor.py

    r76553 r79087  
    162162                oStdIn = StdInOutBuffer(sInput);
    163163            else:
    164                 oStdIn = '/dev/null'; # pylint: disable=R0204
     164                oStdIn = '/dev/null'; # pylint: disable=redefined-variable-type
    165165            fRc = self.oTxsSession.syncExecEx(sExec, (sExec,) + asArgs,
    166166                                              oStdIn = oStdIn, oStdOut = oStdOut,
  • trunk/src/VBox/ValidationKit/tests/storage/storagecfg.py

    r76553 r79087  
    428428            oStorOs = StorageConfigOsSolaris();
    429429        elif sTargetOs == 'linux':
    430             oStorOs = StorageConfigOsLinux(); # pylint: disable=R0204
     430            oStorOs = StorageConfigOsLinux(); # pylint: disable=redefined-variable-type
    431431        else:
    432432            fRc = False;
     
    450450
    451451        # Destroy all volumes first.
    452         for sMountPoint in self.dVols.keys(): # pylint: disable=C0201
     452        for sMountPoint in self.dVols.keys(): # pylint: disable=consider-iterating-dictionary
    453453            self.destroyVolume(sMountPoint);
    454454
    455455        # Destroy all pools.
    456         for sPool in self.dPools.keys(): # pylint: disable=C0201
     456        for sPool in self.dPools.keys(): # pylint: disable=consider-iterating-dictionary
    457457            self.destroyStoragePool(sPool);
    458458
  • trunk/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py

    r76553 r79087  
    3636import sys;
    3737if sys.version_info[0] >= 3:
    38     from io       import StringIO as StringIO;      # pylint: disable=import-error,no-name-in-module
     38    from io       import StringIO as StringIO;      # pylint: disable=import-error,no-name-in-module,useless-import-alias
    3939else:
    40     from StringIO import StringIO as StringIO;      # pylint: disable=import-error,no-name-in-module
     40    from StringIO import StringIO as StringIO;      # pylint: disable=import-error,no-name-in-module,useless-import-alias
    4141
    4242# Only the main script needs to modify the path.
     
    6161def _ControllerTypeToName(eControllerType):
    6262    """ Translate a controller type to a name. """
    63     if eControllerType == vboxcon.StorageControllerType_PIIX3 or eControllerType == vboxcon.StorageControllerType_PIIX4:
     63    if eControllerType in (vboxcon.StorageControllerType_PIIX3, eControllerType == vboxcon.StorageControllerType_PIIX4,):
    6464        sType = "IDE Controller";
    6565    elif eControllerType == vboxcon.StorageControllerType_IntelAhci:
     
    6767    elif eControllerType == vboxcon.StorageControllerType_LsiLogicSas:
    6868        sType = "SAS Controller";
    69     elif eControllerType == vboxcon.StorageControllerType_LsiLogic or eControllerType == vboxcon.StorageControllerType_BusLogic:
     69    elif eControllerType in (vboxcon.StorageControllerType_LsiLogic, vboxcon.StorageControllerType_BusLogic,):
    7070        sType = "SCSI Controller";
    7171    elif eControllerType == vboxcon.StorageControllerType_NVMe:
     
    404404        return asTestCfg;
    405405
    406 class tdStorageBenchmark(vbox.TestDriver):                                      # pylint: disable=R0902
     406class tdStorageBenchmark(vbox.TestDriver):                                      # pylint: disable=too-many-instance-attributes
    407407    """
    408408    Storage benchmark.
     
    579579        return rc;
    580580
    581     def parseOption(self, asArgs, iArg):                                        # pylint: disable=R0912,R0915
     581    def parseOption(self, asArgs, iArg):                                        # pylint: disable=too-many-branches,too-many-statements
    582582        if asArgs[iArg] == '--virt-modes':
    583583            iArg += 1;
     
    944944            oTst = IozoneTest(oExecutor, dTestSet);
    945945        elif sBenchmark == 'fio':
    946             oTst = FioTest(oExecutor, dTestSet); # pylint: disable=R0204
     946            oTst = FioTest(oExecutor, dTestSet); # pylint: disable=redefined-variable-type
    947947
    948948        if oTst is not None:
     
    10451045        return (None, None);
    10461046
    1047     def testOneCfg(self, sVmName, eStorageController, sHostIoCache, sDiskFormat, # pylint: disable=R0913,R0914,R0915
     1047    def testOneCfg(self, sVmName, eStorageController, sHostIoCache, sDiskFormat, # pylint: disable=too-many-arguments,too-many-locals,too-many-statements
    10481048                   sDiskVariant, sDiskPath, cCpus, sIoTest, sVirtMode, sTestSet):
    10491049        """
     
    11091109
    11101110                iDevice = 0;
    1111                 if eStorageController == vboxcon.StorageControllerType_PIIX3 or \
    1112                    eStorageController == vboxcon.StorageControllerType_PIIX4:
     1111                if eStorageController in (vboxcon.StorageControllerType_PIIX3, vboxcon.StorageControllerType_PIIX4,):
    11131112                    iDevice = 1; # Master is for the OS.
    11141113
     
    11411140
    11421141                        iLun = 0;
    1143                         if eStorageController == vboxcon.StorageControllerType_PIIX3 or \
    1144                            eStorageController == vboxcon.StorageControllerType_PIIX4:
     1142                        if eStorageController in (vboxcon.StorageControllerType_PIIX3, vboxcon.StorageControllerType_PIIX4,):
    11451143                            iLun = 1
    11461144                        sDrv, fDrvScsi = self.getStorageDriverFromEnum(eStorageController, True);
  • trunk/src/VBox/ValidationKit/tests/storage/tdStorageSnapshotMerging1.py

    r79022 r79087  
    7979
    8080
    81 class tdStorageSnapshot(vbox.TestDriver):                                      # pylint: disable=R0902
     81class tdStorageSnapshot(vbox.TestDriver):                                      # pylint: disable=too-many-instance-attributes
    8282    """
    8383    Storage benchmark.
     
    109109        return rc;
    110110
    111     def parseOption(self, asArgs, iArg):                                        # pylint: disable=R0912,R0915
     111    def parseOption(self, asArgs, iArg):                                        # pylint: disable=too-many-branches,too-many-statements
    112112        if asArgs[iArg] == '--storage-ctrls':
    113113            iArg += 1;
  • trunk/src/VBox/ValidationKit/tests/storage/tdStorageStress1.py

    r76553 r79087  
    6060    return sType;
    6161
    62 class tdStorageStress(vbox.TestDriver):                                      # pylint: disable=R0902
     62class tdStorageStress(vbox.TestDriver):                                      # pylint: disable=too-many-instance-attributes
    6363    """
    6464    Storage testcase.
     
    125125        return rc;
    126126
    127     def parseOption(self, asArgs, iArg):                                        # pylint: disable=R0912,R0915
     127    def parseOption(self, asArgs, iArg):                                        # pylint: disable=too-many-branches,too-many-statements
    128128        if asArgs[iArg] == '--virt-modes':
    129129            iArg += 1;
     
    326326        return fRc;
    327327
    328     # pylint: disable=R0913
     328    # pylint: disable=too-many-arguments
    329329
    330330    def test1OneCfg(self, sVmName, eStorageController, sDiskFormat, sDiskPath1, sDiskPath2, \
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette