Esempio n. 1
0
 def duplicatePanelCheck(self, panel):
     log('## duplicatePanelCheck')
 
     # Make sure the duplicated panel is found twice on screen
     try:
         matches = list(sikuli.findAll(panel))
         n = len(matches)
         if n != 2:
             self.editTools.testInfo.failed('duplicatePanelCheck: Expected 2 instances of %s, found %s instead.' % (panel, n))
         else:
             log('- Found both instances of the duplicated panel on screen.')
     except FindFailed:
         self.editTools.testInfo.failed('duplicatePanelCheck: Could not find any instance of %s on screen.' % panel)
 
     sikuliUtils.saveVersion(self.editTools.testInfo, 'Duplicated one panel.')
 
     # Check there's 1 more panel in the new shotEdit
     newPanels = checkUtils.newPanelsInShotEdit(self.editTools.testInfo,
                                                {'p': 1},
                                                beats=['p'],
                                                methodName='copyPastePanelCheck')
 
     # Check the new panel has everything in its directory
     checkUtils.checkPanelDir(self.editTools.testInfo, newPanels, ['multitrack', 'jpg', 'xml'], 'duplicatePanelCheck')
 
     log('All checks performed for duplicatePanelCheck.')
Esempio n. 2
0
 def copyPastePanelCheck(self, panel):
     log('## copyPastePanelCheck')
 
     # Make sure the copy/pasted panel is found twice on screen
     try:
         matches = list(sikuli.findAll(panel))
         n = len(matches)
         if n != 2:
             self.editTools.testInfo.failed('copyPastePanelCheck: Expected 2 instances of %s, found %s instead.' % (panel, n))
         else:
             log('- Found both instances of the copy/pasted panel on screen.')
     except FindFailed:
         self.editTools.testInfo.failed('copyPastePanelCheck: Could not find any instance of %s on screen.' % panel)
 
     sikuliUtils.saveVersion(self.editTools.testInfo, 'Copy/pasted one panel.')
 
     # Check there's 1 more panel in the new shotEdit
     checkUtils.newPanelsInShotEdit(self.editTools.testInfo,
                                    {'p': 1},
                                    beats=['p'],
                                    methodName='copyPastePanelCheck')
 
     log('All checks performed for copyPastePanelCheck.')