本文整理汇总了Python中UnitTestUtilities.deleteIfExists方法的典型用法代码示例。如果您正苦于以下问题:Python UnitTestUtilities.deleteIfExists方法的具体用法?Python UnitTestUtilities.deleteIfExists怎么用?Python UnitTestUtilities.deleteIfExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnitTestUtilities
的用法示例。
在下文中一共展示了UnitTestUtilities.deleteIfExists方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import deleteIfExists [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(" ImportWMOStationDataTestCase.setUp")
UnitTestUtilities.checkArcPy()
self.outputFCName = "WMOStationData"
# DO NOT run data download again; dependent data is needed from the ImportWMOStationsTestCase
self.WMOGDB = os.path.join(Configuration.suitabilityDataPath, "WMO.gdb")
self.StationDataInputFC = os.path.join(self.WMOGDB, "WMOFC_output")
self.StationDataOutputFC = os.path.join(self.WMOGDB, self.outputFCName)
self.WMOFolder = os.path.join(Configuration.suitabilityDataPath, "WMOStationFiles")
UnitTestUtilities.checkFilePaths([Configuration.suitabilityDataPath, Configuration.maow_ToolboxPath, self.WMOFolder, self.WMOGDB])
UnitTestUtilities.deleteIfExists(self.StationDataOutputFC)
示例2: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import deleteIfExists [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(" VisibilityRangeAtSeaTestCase.setUp")
UnitTestUtilities.checkArcPy()
# Configuration.suitabilityDataPath = os.path.join(Configuration.suitabilityPaths, "data")
self.maritimeOutputGDB = os.path.join(Configuration.maritimeDataPath, "output.gdb")
self.maritimeDataGDB = os.path.join(Configuration.maritimeDataPath, "data.gdb")
self.visibleRange = os.path.join(self.maritimeOutputGDB, "visRangeOutput")
self.vessel = os.path.join(self.maritimeOutputGDB, "vesselOutput")
self.shipLocation = os.path.join(self.maritimeDataGDB, "Ships")
UnitTestUtilities.checkFilePaths([Configuration.maritimeDataPath, Configuration.maritime_DesktopToolboxPath, Configuration.maritime_ProToolboxPath])
UnitTestUtilities.deleteIfExists(self.vessel)
UnitTestUtilities.deleteIfExists(self.visibleRange)