本文整理汇总了Python中utils.pyUtils.log函数的典型用法代码示例。如果您正苦于以下问题:Python log函数的具体用法?Python log怎么用?Python log使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了log函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: toAvidCheck
def toAvidCheck(self, timeout):
"""Method to check the Avid publish was successful
:param timeout: Time in sec before assuming the publish failed if there was no popup
:return: None
"""
log('## toAvidCheck')
if not self.__waitPopup(timeout, "toAvidCheck"):
return
# Check all the PNGs have been created
editPanels = self.toEditorial.testInfo.getPanelsFromShotEdit(perBeat=False)
checkUtils.checkPanelDir(self.toEditorial.testInfo, editPanels, ['hdPng'], 'toAvidCheck')
ale = self.__checkAleExists()
if ale:
self.__checkAleContents(ale, editPanels)
self.__checkAafs()
self.__checkMarkersTxt()
# TODO: Check the html email for details of what failed
log('All checks performed for toAvid.')
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:25,代码来源:toEditorial.py
示例2: sbpToFlixCheck
def sbpToFlixCheck(self, sbpShow):
log('## sbpToFlixCheck')
# SBP creates an extra version for some reason
self.fromSbp.testInfo.incrementEditVersion()
if not self.__checkStartProcessing():
return
# Read the CSV settings file for the given show to know what to expect
self.settings = checkUtils.readSbpSettings(self.fromSbp.testInfo, sbpShow)
if not self.__waitPopup():
return
self.__waitProcessed()
# Save the edit after the SBP import was successful
sikuliUtils.saveVersion(self.fromSbp.testInfo, 'Imported %s from SBP.' % sbpShow)
self.__waitEmptyDir()
self.__countNewPanels()
editPanels = self.fromSbp.testInfo.getPanelsFromShotEdit()
self.__checkNewPanels(editPanels)
self.__checkMarkers()
# TODO: Check audio file was created and audio tracks were copied over
self.__updateTestInfo(editPanels)
log('All checks performed for sbpToFlix.')
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:33,代码来源:fromSbp.py
示例3: toSBPCheck
def toSBPCheck(self, timeout):
"""Checks the publish to SBP was successful
:param timeout: Time in sec before assuming the publish failed if there was no popup
:return: None
"""
log('## toSBPCheck:')
if not self.__waitPopup(timeout, "toSBPCheck"):
return
# Check the XML was created
xml = self.__checkSbpXml()
if not xml:
return
# Check all the panels are in the XML
self.__checkPanelsInSbpXml(xml)
# Check the existing SBP panels have their Unique IDs in the XML
self.__checkSbpIds(xml)
# Check the audio is in the XML
self.__checkAudioSbpXml(xml)
log('All checks performed for toSBP.')
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:26,代码来源:toEditorial.py
示例4: __waitProcessed
def __waitProcessed(self):
# Wait until all the panels have finished processing
if sikuli.waitVanish('processing.png', 30):
log("- All panels have finished processing.")
else:
self.fromSbp.testInfo.failed('sbpToFlixCheck: Some panels are still '
'processing 30sec after plugin finished.')
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:7,代码来源:fromSbp.py
示例5: readSbpSettings
def readSbpSettings(testInfo, sbpShow):
"""Reads the sbpShow_settings.csv file containing all the info for what to expect from the SBP import
:param testInfo: TestInfo object
:param sbpShow: Name of the SBP project to be imported
:return: dict: dictionary containing information on what to expect from the SBP import
"""
# Setting defaults so that the check doesn't fail if something's missing from the csv file
settings = {"timeout": 200, "stills": 0, "animated": 0, "replace": 0, "markers": []}
sourceDir = "%s/assets/fromSBP/%s/" % (testInfo.testPath, sbpShow)
file = "%s/%s_settings.csv" % (sourceDir, sbpShow)
if not os.path.exists(file):
log("readSbpSettings: Could not find settings csv file for SBP show:\n%s" % file, "error")
return settings
with open(file, "rb") as csvfile:
csvreader = csv.reader(csvfile)
for row in csvreader:
for setting in settings:
if setting == "markers" and row[0] == setting:
for marker in row[1:]:
settings[setting].append(marker)
elif row[0] == setting:
settings[setting] = int(row[1])
log("readSbpSettings: Settings read from the SBP csv file:\n%s" % settings, "debug")
return settings
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:29,代码来源:checkUtils.py
示例6: publishToFlixCheck2
def publishToFlixCheck2(self, comment, assetName, toShotgun, branch, asStills):
log("## publishToFlixCheck:")
publishSettings = checkUtils.readPublishSettings(self.fromEditorial.testInfo, assetName)
timeout = publishSettings["timeout"]
checkUtils.popupCheck(self.fromEditorial.testInfo, timeout, methodName="publishToFlixCheck")
# Check the audio was created
checkUtils.newAudioFile(self.fromEditorial.testInfo, methodName="publishToFlixCheck")
# Update self.fromEditorial.testInfo
if branch != "main":
self.fromEditorial.testInfo.currentBranch = branch
self.fromEditorial.testInfo.incrementEditVersion()
# Check the editorial branch was created, the shotEdit is there and it's got the comment
if not self.__checkShotEdit(comment):
return 0
self.__checkMarkers(publishSettings["markers"])
self.__checkDuration(publishSettings["duration"])
self.__checkNPanels(
publishSettings["stillRefs"] + publishSettings["animatedRefs"] + publishSettings["existing"]
)
self.__checkPanels(publishSettings["stillRefs"], publishSettings["animatedRefs"], publishSettings["existing"])
log("All checks performed for publishToFlix.")
return 1
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:33,代码来源:fromEditorial.py
示例7: readMayaSettings
def readMayaSettings(testInfo, assetName):
# Setting defaults so that the check doesn't fail if something's missing from the csv file
settings = {"inFrame": 1, "outFrame": 24, "nShots": 0, "shotNames": [], "shotDurations": [], "audio": 0}
sourceDir = "%s/assets/fromMaya/" % testInfo.testPath
infoFile = "%s/%s_info.csv" % (sourceDir, assetName.strip(".mb"))
if not os.path.exists(infoFile):
log("readMayaSettings: Could not find info csv file %s." % infoFile, "error")
return settings
with open(infoFile, "rb") as csvfile:
csvreader = csv.reader(csvfile)
for row in csvreader:
if row[0] == "frameRange":
settings["inFrame"] = int(row[1])
settings["outFrame"] = int(row[2])
elif row[0] == "nShots":
settings["nShots"] = int(row[1])
elif row[0] == "shotNames":
for shot in range(1, settings["nShots"] + 1):
settings["shotNames"].append(row[shot])
elif row[0] == "shotDurations":
for shot in range(1, settings["nShots"] + 1):
settings["shotDurations"].append(int(row[shot]))
elif row[0] == "audio":
settings["audio"] = int(row[1])
log("readMayaSettings: Settings read from the Maya csv file:\n%s" % settings, "debug")
return settings
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:30,代码来源:checkUtils.py
示例8: readPublishSettings
def readPublishSettings(testInfo, assetName):
# Setting defaults so that the check doesn't fail if something's missing from the csv file
settings = {
"timeout": 300,
"stillRefs": 0,
"animatedRefs": 0,
"undefinedRefs": 0,
"existing": 0,
"markers": [],
"duration": 300,
}
sourceDir = "%s/assets/fromEditorial/" % testInfo.testPath
file = "%s/%s_settings.csv" % (sourceDir, assetName)
if not os.path.exists(file):
log("readPublishSettings: Could not find settings csv file %s." % file, "error")
return settings
with open(file, "rb") as csvfile:
csvreader = csv.reader(csvfile)
for row in csvreader:
for setting in settings:
if setting == "markers" and row[0] == setting:
for marker in row[1:]:
settings[setting].append(marker)
elif row[0] == setting:
settings[setting] = int(row[1])
log("readPublishSettings: Settings read from the Publish csv file:\n%s" % settings, "debug")
return settings
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:32,代码来源:checkUtils.py
示例9: importPanelsCheck
def importPanelsCheck(self, ext, nPanels, panelList, checkImage=True, replace=0):
log('## importPanelsCheck')
if checkImage:
self.__checkImage(ext, nPanels, panelList)
else:
self.__checkDoneProcessing(ext, nPanels)
sikuliUtils.saveVersion(self.importDrawing.testInfo, 'Imported %s %ss.' % (nPanels, ext))
# Check there's nPanels more panels in the current shotEdit
if ext == 'mov':
beat = 'a'
else:
beat = 'p'
newPanels = checkUtils.newPanelsInShotEdit(self.importDrawing.testInfo,
{beat: nPanels},
replace,
beats=[beat],
methodName='importPanelsCheck')
checkUtils.checkPanelDir(self.importDrawing.testInfo, newPanels,
['multitrack', 'jpg', 'xml'], 'importPanelsCheck')
# Check the pose for each panel was copied
checkUtils.checkPanelPose(self.importDrawing.testInfo, newPanels, 'importPanelsCheck')
if not replace:
self.__checkDuration(ext, nPanels, panelList)
log('All checks performed for importPanels.')
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:30,代码来源:importDrawing.py
示例10: addDialogueCheck
def addDialogueCheck(self, panels, dialogue):
"""Checks the dialogue has been saved in each panel's multitrack
:param panels: Array of panel indices to check for dialogue
:param dialogue: String added to each panel as dialogue
:return: None
"""
log('## addDialogueCheck')
sikuliUtils.saveVersion(self.editTools.testInfo, 'Added dialogue to %s panels.' % len(panels))
editPanels = self.editTools.testInfo.getPanelsFromShotEdit(perBeat=False)
missing = []
for panel in panels:
multitrackDialogue = self.editTools.testInfo.getPanelDialogue(editPanels[panel-1])
if dialogue.replace("[panelIndex]", str(panel)) == multitrackDialogue:
log("addDialogueCheck: Found dialogue in %s's multitrack." % editPanels[panel-1], "debug")
else:
missing.append(editPanels[panel-1])
log("addDialogueCheck: Couldn't find dialogue in %s's multitrack." % editPanels[panel-1], "error")
self.editTools.testInfo.dialogue[editPanels[panel-1]] = multitrackDialogue
if len(missing):
self.editTools.testInfo.failed("addDialogue: Failed to find dialogue in the following panels' multitracks: "
"%s" % missing)
else:
log("addDialogueCheck: Found dialogue in every panel's multitrack.")
log('All checks performed for addDialogue.')
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:28,代码来源:editTools.py
示例11: __waitEmptyDir
def __waitEmptyDir(self):
# Wait until the ~/flix directory is empty, meaning the import is complete
if pyUtils.waitUntilEmpty(self.fromSbp.sbpDir, 5) == 0:
self.fromSbp.testInfo.failed('sbpToFlixCheck: ~/flix directory still '
'not empty after %s seconds.' % (self.settings["timeout"] + 5))
pyUtils.emptyDir(self.fromSbp.sbpDir)
else:
log('- ~/flix directory emptied after SBP import.')
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:8,代码来源:fromSbp.py
示例12: __checkPanelsInSbpXml
def __checkPanelsInSbpXml(self, xml):
expectedAnyClips = self.toEditorial.testInfo.getEditPanels(True)
foundAnyClips = pyUtils.findOccurences('<mastercomment1>', xml)
if foundAnyClips != expectedAnyClips:
self.toEditorial.testInfo.failed('toSBPCheck: Expected %s clips in the XML, '
'found %s instead.' % (expectedAnyClips, foundAnyClips))
else:
log('- Found all expected clips in the XML.')
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:8,代码来源:toEditorial.py
示例13: __getFcpNewPanels
def __getFcpNewPanels(self):
fcpNew = []
for beat in self.toEditorial.testInfo.editPanels.iterkeys():
if beat in ['a', 'p', 's']:
for panel in self.toEditorial.testInfo.editPanels[beat]:
if panel not in self.toEditorial.testInfo.fcpPublished:
fcpNew.append(panel)
log('toPremiereCheck: fcpNew: %s' % fcpNew, 'debug')
return fcpNew
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:9,代码来源:toEditorial.py
示例14: __checkAleImported
def __checkAleImported(self):
# Check the ALE is in the output path
if not os.path.exists('%s/%s_%s_v%s.ale' % (self.toEditorial.toAvidOutputDir,
self.toEditorial.testInfo.sequence,
self.toEditorial.testInfo.currentBranch,
self.toEditorial.testInfo.mainVersion)):
self.toEditorial.testInfo.failed('importToAvidCheck: Did not find the ALE imported.')
else:
log('- Found the ALE after import.')
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:9,代码来源:toEditorial.py
示例15: loadLatestVersionCheck
def loadLatestVersionCheck(self):
"""Checks whether the latest version of the sequence was loaded
:return: None
"""
log('## loadLatestVersionCheck')
log("No check for this method yet!")
self.projectBrowser.showing = False
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:9,代码来源:projectBrowser.py
示例16: __waitPopup
def __waitPopup(self, timeout, methodName):
startTime = time.time()
# Wait for the OK popup
if not checkUtils.popupCheck(self.toEditorial.testInfo, timeout, methodName):
self.toEditorial.testInfo.failed('%s: No popup after %s sec, '
'check log for errors. Exiting current checks...' % (methodName, timeout))
return 0
log("%s: Found popup after %ssec (timeout was %ssec)." % (methodName, int(time.time()-startTime), timeout))
return 1
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:9,代码来源:toEditorial.py
示例17: __checkDoneProcessing
def __checkDoneProcessing(ext, nPanels):
# Assuming 1sec per panel is enough for Flix to be done processing
if ext != 'mov':
timeout = nPanels
else:
timeout = nPanels*30
if not sikuliUtils.waitUntilGone('processing.png', timeout):
log('importPanelsCheck: Still processing after %s seconds; may need to increase the timeout.'
% timeout, 'error')
sikuliUtils.waitUntilGone('processing.png', timeout)
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:10,代码来源:importDrawing.py
示例18: doneProcessing
def doneProcessing(testInfo, timeout, methodName="methodName"):
"""Waits until the 'Processing' thumbnail is gone
:param testInfo: TestInfo object
:param timeout: Maximum time (in seconds) before returning if images are still being processed
:param methodName: Name of the method calling me, useful for logging
:return: None
"""
if sikuliUtils.waitUntilGone("processing.png", timeout) == 0:
log("%s: still processing after %s seconds." % (methodName, timeout), "error")
else:
log("- Flix has finished processing thumbnails")
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:12,代码来源:checkUtils.py
示例19: __checkPublishedFcpDir
def __checkPublishedFcpDir(self, fcpNew):
publishedDir = '%s/published' % self.toEditorial.fcpDir
publishedFiles = pyUtils.getPanelsFromDir(publishedDir)
if len(publishedFiles) != (len(self.toEditorial.testInfo.fcpPublished) + len(set(fcpNew))):
self.toEditorial.testInfo.failed('toPremiereCheck: %s files should be '
'in the published directory, found %s instead.' %
((len(self.toEditorial.testInfo.fcpPublished) + len(set(fcpNew))),
len(publishedFiles)))
else:
log('- Found expected %s files in the published directory.' % len(publishedFiles))
self.toEditorial.testInfo.fcpPublished = publishedFiles
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:12,代码来源:toEditorial.py
示例20: __checkStartProcessing
def __checkStartProcessing(self):
"""Waits 10sec for the 'Processing' panel to make sure the SBP import process has started
:return: 1 if Processing panel is found, 0 otherwise
"""
if sikuli.exists("processing.png", 10):
log("- Flix has started processing panels.")
return 1
else:
self.fromSbp.testInfo.failed("sbpToFlixCheck: Flix has not started processing panels after 10sec, "
"probably failed to parse the XML. Exiting...")
return 0
开发者ID:briceFoundry,项目名称:flix_qa_2,代码行数:12,代码来源:fromSbp.py
注:本文中的utils.pyUtils.log函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论