Changeset 79092 in vbox for trunk/src/VBox/ValidationKit/testmanager/webui
- Timestamp:
- Jun 11, 2019 3:26:40 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131252
- Location:
- trunk/src/VBox/ValidationKit/testmanager/webui
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/webui/wuibase.py
r79087 r79092 53 53 For exceptions raised by Web UI code. 54 54 """ 55 pass; 55 pass; # pylint: disable=unnecessary-pass 56 56 57 57 … … 410 410 # HACK: Checkboxes doesn't return a value when unchecked, so we always 411 411 # provide a default when dealing with boolean parameters. 412 return sValue == 'True' or sValue == 'true' or sValue == '1';412 return sValue in ('True', 'true', '1',); 413 413 414 414 def getIntParam(self, sName, iMin = None, iMax = None, iDefault = None): … … 547 547 oListEntryTestCaseArgs = [] 548 548 for idTestCaseArgs in aiAllTestCaseArgs: 549 fArgsChecked = True if idTestCaseArgs in aiCheckedTestCaseArgs else False549 fArgsChecked = idTestCaseArgs in aiCheckedTestCaseArgs; 550 550 551 551 # Dry run … … 562 562 sTestCaseName = self.getStringParam('%s[%d][sName]' % (sName, idTestCase), sDefault='') 563 563 564 oListEntryTestCase = \ 565 (idTestCase, 566 True if idTestCase in aiSelectedTestCaseIds else False, 567 sTestCaseName, 568 oListEntryTestCaseArgs) 564 oListEntryTestCase = ( 565 idTestCase, 566 idTestCase in aiSelectedTestCaseIds, 567 sTestCaseName, 568 oListEntryTestCaseArgs 569 ); 569 570 570 571 aoListOfTestCases.append(oListEntryTestCase) -
trunk/src/VBox/ValidationKit/testmanager/webui/wuicontentbase.py
r79087 r79092 54 54 def __init__(self): 55 55 """Dummy init to shut up pylint.""" 56 pass; 56 pass; # pylint: disable=unnecessary-pass 57 57 58 58 def toHtml(self): … … 732 732 aoRet = [] 733 733 for sListItem in asListItems: 734 fEnabled = True if sListItem in asSelectedItems else False734 fEnabled = sListItem in asSelectedItems; 735 735 aoRet.append((sListItem, fEnabled, sListItem)) 736 736 return aoRet -
trunk/src/VBox/ValidationKit/testmanager/webui/wuigraphwiz.py
r76553 r79092 205 205 # Must be at least two series for something to be splittable. 206 206 if len(aoSeries) <= 1: 207 if len(aoSeries) < 1:207 if not aoSeries: 208 208 return []; 209 209 return [aoSeries,]; -
trunk/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphgooglechart.py
r79087 r79092 42 42 class WuiHlpGraphGoogleChartsBase(WuiHlpGraphBase): 43 43 """ Base class for the Google Charts graphs. """ 44 pass; 44 pass; # pylint: disable=unnecessary-pass 45 45 46 46 -
trunk/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphmatplotlib.py
r79087 r79092 33 33 import sys; 34 34 if sys.version_info[0] >= 3: 35 from io import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module 35 from io import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module,useless-import-alias 36 36 else: 37 from StringIO import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module 37 from StringIO import StringIO as StringIO; # pylint: disable=import-error,no-name-in-module,useless-import-alias 38 38 39 39 import matplotlib; # pylint: disable=import-error -
trunk/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphsimple.py
r76553 r79092 148 148 """ 149 149 150 pass; 150 pass; # pylint: disable=unnecessary-pass 151 151 -
trunk/src/VBox/ValidationKit/testmanager/webui/wuimain.py
r79087 r79092 759 759 oTrLogic = TestResultLogic(self._oDb); 760 760 sAltSelectorAction = None; 761 if enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeNone \ 762 or enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeTestBox: 761 if enmResultsGroupingType in (TestResultLogic.ksResultsGroupingTypeNone, TestResultLogic.ksResultsGroupingTypeTestBox,): 763 762 aoTmp = oTrLogic.getTestBoxes(tsNow = tsEffective, sPeriod = sCurPeriod) 764 aoGroupMembers = sorted(list( set([ (x.idTestBox, '%s (%s)' % (x.sName, str(x.ip))) for x in aoTmp ])),763 aoGroupMembers = sorted(list({(x.idTestBox, '%s (%s)' % (x.sName, str(x.ip))) for x in aoTmp }), 765 764 reverse = False, key = lambda asData: asData[1]) 766 765 … … 774 773 elif enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeTestGroup: 775 774 aoTmp = oTrLogic.getTestGroups(tsNow = tsEffective, sPeriod = sCurPeriod); 776 aoGroupMembers = sorted(list( set([ (x.idTestGroup, x.sName ) for x in aoTmp ])),775 aoGroupMembers = sorted(list({ (x.idTestGroup, x.sName ) for x in aoTmp }), 777 776 reverse = False, key = lambda asData: asData[1]) 778 777 self._sPageTitle = 'Grouped by Test Group' … … 780 779 elif enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeBuildRev: 781 780 aoTmp = oTrLogic.getBuilds(tsNow = tsEffective, sPeriod = sCurPeriod) 782 aoGroupMembers = sorted(list( set([ (x.iRevision, '%s.%d' % (x.oCat.sBranch, x.iRevision)) for x in aoTmp ])),781 aoGroupMembers = sorted(list({ (x.iRevision, '%s.%d' % (x.oCat.sBranch, x.iRevision)) for x in aoTmp }), 783 782 reverse = True, key = lambda asData: asData[0]) 784 783 self._sPageTitle = 'Grouped by Build' … … 786 785 elif enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeBuildCat: 787 786 aoTmp = oTrLogic.getBuildCategories(tsNow = tsEffective, sPeriod = sCurPeriod) 788 aoGroupMembers = sorted(list( set([ ( x.idBuildCategory, '%s / %s / %s / %s'789 790 for x in aoTmp ])),787 aoGroupMembers = sorted(list({ (x.idBuildCategory, 788 '%s / %s / %s / %s' % ( x.sProduct, x.sBranch, ', '.join(x.asOsArches), x.sType) ) 789 for x in aoTmp }), 791 790 reverse = True, key = lambda asData: asData[1]); 792 791 self._sPageTitle = 'Grouped by Build Category' … … 794 793 elif enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeTestCase: 795 794 aoTmp = oTrLogic.getTestCases(tsNow = tsEffective, sPeriod = sCurPeriod) 796 aoGroupMembers = sorted(list( set([ (x.idTestCase, '%s' % x.sName) for x in aoTmp ])),795 aoGroupMembers = sorted(list({ (x.idTestCase, '%s' % x.sName) for x in aoTmp }), 797 796 reverse = False, key = lambda asData: asData[1]) 798 797 self._sPageTitle = 'Grouped by Test Case' … … 810 809 elif enmResultsGroupingType == TestResultLogic.ksResultsGroupingTypeSchedGroup: 811 810 aoTmp = oTrLogic.getSchedGroups(tsNow = tsEffective, sPeriod = sCurPeriod) 812 aoGroupMembers = sorted(list( set([ (x.idSchedGroup, '%s' % x.sName) for x in aoTmp ])),811 aoGroupMembers = sorted(list({ (x.idSchedGroup, '%s' % x.sName) for x in aoTmp }), 813 812 reverse = False, key = lambda asData: asData[1]) 814 813 self._sPageTitle = 'Grouped by Scheduling Group' -
trunk/src/VBox/ValidationKit/testmanager/webui/wuireport.py
r79087 r79092 91 91 Returns HTML. 92 92 """ 93 assert sWhere == 'top' or sWhere == 'bottom';93 assert sWhere in ('top', 'bottom',); 94 94 95 95 return '';
Note:
See TracChangeset
for help on using the changeset viewer.