本文整理汇总了Python中UnitTestUtilities.checkArcPy方法的典型用法代码示例。如果您正苦于以下问题:Python UnitTestUtilities.checkArcPy方法的具体用法?Python UnitTestUtilities.checkArcPy怎么用?Python UnitTestUtilities.checkArcPy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnitTestUtilities
的用法示例。
在下文中一共展示了UnitTestUtilities.checkArcPy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(" SubSpecificationsTestCase.setUp")
UnitTestUtilities.checkArcPy()
self.maritimeDataGDB = os.path.join(Configuration.maritimeDataPath, "Maritime Decision Aid Tools.gdb")
self.subSpecsTable = os.path.join(self.maritimeDataGDB, "Sub_Specs")
UnitTestUtilities.checkFilePaths([Configuration.maritimeDataPath, Configuration.maritime_DesktopToolboxPath, Configuration.maritime_ProToolboxPath])
示例2: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(" SunPositionAndHillshadeTestCase.setUp")
''' Initialization needed if running Test Case standalone '''
Configuration.GetLogger()
Configuration.GetPlatform()
''' End standalone initialization '''
self.toolboxUnderTest = Configuration.sunPositionAnalysisToolboxPath + \
Configuration.GetToolboxSuffix()
UnitTestUtilities.checkArcPy()
DataDownload.runDataDownload(Configuration.sunPositionAnalysisDataPath, \
Configuration.sunPositionInputGDB, Configuration.sunPositionAnalysisURL)
if (self.scratchGDB == None) or (not arcpy.Exists(self.scratchGDB)):
self.scratchGDB = UnitTestUtilities.createScratch(Configuration.sunPositionAnalysisDataPath)
# set up inputs
self.inputArea = os.path.join(Configuration.sunPositionInputGDB, r"inputArea")
self.inputSurface = os.path.join(Configuration.sunPositionInputGDB, r"Jbad_SRTM_USGS_EROS")
self.compareResults = os.path.join(Configuration.sunPositionInputGDB, r"compareResults_2017_8_10_16_30_00")
UnitTestUtilities.checkFilePaths([Configuration.sunPositionAnalysisDataPath])
UnitTestUtilities.checkGeoObjects([Configuration.sunPositionInputGDB, \
self.toolboxUnderTest, self.scratchGDB, \
self.inputArea, self.inputSurface, \
self.compareResults])
示例3: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(".....HotSpotsByAreaTestCase.setUp")
''' Initialization needed if running Test Case standalone '''
Configuration.GetLogger()
Configuration.GetPlatform()
''' End standalone initialization '''
self.toolboxUnderTest = Configuration.incidentToolboxPath + Configuration.GetToolboxSuffix()
UnitTestUtilities.checkArcPy()
DataDownload.runDataDownload(Configuration.incidentAnalysisDataPath, Configuration.incidentInputGDB, Configuration.incidentURL)
if (self.incidentScratchGDB == None) or (not arcpy.Exists(self.incidentScratchGDB)):
self.incidentScratchGDB = UnitTestUtilities.createScratch(Configuration.incidentAnalysisDataPath)
self.inputAOIFeatures = os.path.join(Configuration.incidentInputGDB, "Districts")
self.inputIncidents = os.path.join(Configuration.incidentInputGDB, "Incidents")
UnitTestUtilities.checkFilePaths([Configuration.incidentAnalysisDataPath])
UnitTestUtilities.checkGeoObjects([Configuration.incidentInputGDB, \
self.incidentScratchGDB, \
self.toolboxUnderTest, \
self.inputAOIFeatures, \
self.inputIncidents])
示例4: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(".....ClusterAnalysisTestCase.setUp")
''' Initialization needed if running Test Case standalone '''
Configuration.GetLogger()
Configuration.GetPlatform()
''' End standalone initialization '''
self.toolboxUnderTest = Configuration.incidentToolboxPath + Configuration.GetToolboxSuffix()
UnitTestUtilities.checkArcPy()
DataDownload.runDataDownload(Configuration.incidentAnalysisDataPath, Configuration.incidentInputGDB, Configuration.incidentURL)
# set up inputs
self.inputPointsFeatures = os.path.join(Configuration.incidentInputGDB, "Incidents")
arcpy.env.OverwriteOutputs = True
UnitTestUtilities.checkFilePaths([Configuration.incidentAnalysisDataPath])
UnitTestUtilities.checkGeoObjects([Configuration.incidentInputGDB, \
Configuration.incidentResultGDB, \
self.toolboxUnderTest, \
self.inputPointsFeatures])
示例5: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
''' set-up code '''
if Configuration.DEBUG == True: print(" HLZTouchdownPoints.setUp")
UnitTestUtilities.checkArcPy()
self.testDataFolderPath = DataDownload.createDataFolder(Configuration.capabilityPath)
print("Created Capability test data folder.")
UnitTestUtilities.checkFilePaths([self.testDataFolderPath,
self.tbxProFolderPath,
self.tbxDesktopFolderPath])
self.testDataGeodatabase = os.path.join(self.testDataFolderPath, r"test_hlz_tools.gdb")
# Check the test inputs (do they exist? or not?)
if (self.scratchGDB == None) or (not arcpy.Exists(self.scratchGDB)):
self.scratchGDB = UnitTestUtilities.createScratch(self.testDataFolderPath)
# Setup the test inputs
self.inputAirframeTable = os.path.join(self.testDataGeodatabase, r"Aircraft_Specifications")
self.inputSuitableAreas = os.path.join(self.testDataGeodatabase, r"HLZSelectionArea")
self.inputSlope = os.path.join(self.testDataGeodatabase, r"SRTMPctSlope")
self.outputGeodatabase = os.path.join(self.scratchGDB)
self.outputCenterpoints = os.path.join(self.outputGeodatabase, r"centerPoints")
self.outputCircles = os.path.join(self.outputGeodatabase, r"tdCircles")
UnitTestUtilities.checkGeoObjects([self.testDataGeodatabase,
self.outputGeodatabase,
self.inputAirframeTable,
self.inputSuitableAreas,
self.inputSlope])
return
示例6: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG is True: print(" CreateReferenceSystemGRGFromAreaTestCase.setUp")
''' Initialization needed if running Test Case standalone '''
Configuration.GetLogger()
Configuration.GetPlatform()
''' End standalone initialization '''
self.toolboxUnderTest = Configuration.grgToolboxPath
UnitTestUtilities.checkArcPy()
DataDownload.runDataDownload(Configuration.grgPath,
Configuration.grgInputGDB,
Configuration.grgURL)
if (self.scratchGDB is None) or (not arcpy.Exists(self.scratchGDB)):
self.scratchGDB = UnitTestUtilities.createScratch(Configuration.grgPath)
# set up inputs
self.inputArea = os.path.join(Configuration.grgInputGDB, r"inputAO")
self.inputArea10m = os.path.join(Configuration.grgInputGDB, r"inputAO10m")
self.ref_grid = "MGRS"
self.large_grid_handling = "ALLOW_LARGE_GRIDS"
self.ignore_options = ["IGNORE_M",
"IGNORE_Z",
"IGNORE_POINTID",
"IGNORE_EXTENSION_PROPERTIES",
"IGNORE_SUBTYPES",
"IGNORE_RELATIONSHIPCLASSES",
"IGNORE_REPRESENTATIONCLASSES"]
UnitTestUtilities.checkFilePaths([Configuration.grgPath])
UnitTestUtilities.checkGeoObjects([Configuration.grgInputGDB,
self.toolboxUnderTest,
self.scratchGDB,
self.inputArea])
开发者ID:Esri,项目名称:solutions-geoprocessing-toolbox,代码行数:36,代码来源:CreateReferenceSystemGRGFromAreaTestCase.py
示例7: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(".....CountIncidentsByLOCTestCase.setUp")
''' Initialization needed if running Test Case standalone '''
Configuration.GetLogger()
Configuration.GetPlatform()
''' End standalone initialization '''
self.toolboxUnderTest = Configuration.incidentToolboxPath + Configuration.GetToolboxSuffix()
UnitTestUtilities.checkArcPy()
DataDownload.runDataDownload(Configuration.incidentAnalysisDataPath, Configuration.incidentInputGDB, Configuration.incidentURL)
# set up inputs
self.inputPointsFeatures = os.path.join(Configuration.incidentInputGDB, "Incidents")
self.inputLinesFeatures = os.path.join(Configuration.incidentInputGDB, "Roads")
self.inputAOIFeatures = os.path.join(Configuration.incidentInputGDB, "Districts")
self.resultCompareFeatures0001 = os.path.join(Configuration.incidentResultGDB, "resultsCountIncidentsByLOC_0001")
UnitTestUtilities.checkFilePaths([Configuration.incidentAnalysisDataPath])
UnitTestUtilities.checkGeoObjects([Configuration.incidentInputGDB, \
Configuration.incidentResultGDB, \
self.toolboxUnderTest, \
self.inputPointsFeatures, \
self.inputLinesFeatures, \
self.inputAOIFeatures, \
self.resultCompareFeatures0001])
示例8: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(" DistanceToAssetsTestCase.setUp")
''' Initialization needed if running Test Case standalone '''
Configuration.GetLogger()
Configuration.GetPlatform()
''' End standalone initialization '''
self.toolboxUnderTest = Configuration.distancetoAssetsToolboxPath + \
Configuration.GetToolboxSuffix()
UnitTestUtilities.checkArcPy()
DataDownload.runDataDownload(Configuration.distanceToAssetsDataPath, \
Configuration.distanceToAssetsInputGDB, Configuration.distanceToAssetsURL)
self.suffix = Configuration.GetToolboxSuffix()
#self.inputND = os.path.join(Configuration.distanceToAssetsInputNDGDB, "Transportation/Streets_ND")
self.inputND=r"\\redarchive2\disl\Development\Commercial\TestData\DistanceToAssets\SanFrancisco.gdb\Transportation\Streets_ND"
self.inputAssetsPro = os.path.join(Configuration.distanceToAssetsInputGDB, "AssetsGeocoded_pro_SF")
self.inputAssets = os.path.join(Configuration.distanceToAssetsInputGDB, "AssetsGeocoded_SF")
self.inputBasesPro = os.path.join(Configuration.distanceToAssetsInputGDB, "BasesGeocoded_pro_SF")
self.inputBases = os.path.join(Configuration.distanceToAssetsInputGDB, "BasesGeocoded_SF")
if (self.scratchGDB == None) or (not arcpy.Exists(self.scratchGDB)):
self.scratchGDB = UnitTestUtilities.createScratch(Configuration.distanceToAssetsDataPath)
UnitTestUtilities.checkFilePaths([Configuration.distanceToAssetsDataPath])
UnitTestUtilities.checkGeoObjects([Configuration.distanceToAssetsInputGDB, self.toolboxUnderTest, self.scratchGDB, self.inputAssets, self.inputBases, self.inputND])
开发者ID:Esri,项目名称:solutions-geoprocessing-toolbox,代码行数:32,代码来源:DistanceToAssetsRouteAssetsToBasesLocalTestCase.py
示例9: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(" DistanceToAssetsTestCase.setUp")
''' Initialization needed if running Test Case standalone '''
Configuration.GetLogger()
Configuration.GetPlatform()
''' End standalone initialization '''
self.toolboxUnderTest = Configuration.distancetoAssetsToolboxPath + \
Configuration.GetToolboxSuffix()
self.suffix = Configuration.GetToolboxSuffix()
UnitTestUtilities.checkArcPy()
DataDownload.runDataDownload(Configuration.distanceToAssetsDataPath, \
Configuration.distanceToAssetsInputGDB, Configuration.distanceToAssetsURL)
self.inputLocator = os.path.join(Configuration.distanceToAssetsDataPath, r"DistanceToAssetsTestData\Sample Locations\arcgisonline\World.GeocodeServer")
if (self.scratchGDB == None) or (not arcpy.Exists(self.scratchGDB)):
self.scratchGDB = UnitTestUtilities.createScratch(Configuration.distanceToAssetsDataPath)
UnitTestUtilities.checkFilePaths([Configuration.distanceToAssetsDataPath])
UnitTestUtilities.checkGeoObjects([Configuration.distanceToAssetsInputGDB, self.toolboxUnderTest, self.scratchGDB, self.inputLocator])
开发者ID:Esri,项目名称:solutions-geoprocessing-toolbox,代码行数:27,代码来源:DistanceToAssetsCodeAssetsToBasesTestCase.py
示例10: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(" SubsetRasterWorkspaceTestCase.setUp")
UnitTestUtilities.checkArcPy()
# DO NOT run data download again; dependent data is needed from ImportCRUToRasterTestCase
self.sourceWorkspace = os.path.join(Configuration.suitabilityDataPath, "CRURasters.gdb")
self.targetWorkspace = os.path.join(Configuration.suitabilityDataPath, "SubsetRasters.gdb")
UnitTestUtilities.checkFilePaths([Configuration.suitabilityDataPath, Configuration.maow_ToolboxPath, self.sourceWorkspace, self.targetWorkspace])
示例11: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(" ImportCRUToRasterTestCase.setUp")
UnitTestUtilities.checkArcPy()
Configuration.suitabilityDataPath = DataDownload.runDataDownload(Configuration.suitabilityPaths, "MilitaryAspectsOfWeatherTestData", Configuration.maowURL)
self.inputCRUFolder = os.path.join(Configuration.suitabilityDataPath, "CRUdata")
self.outputWorkspace = os.path.join(Configuration.suitabilityDataPath, "CRURasters.gdb")
UnitTestUtilities.checkFilePaths([Configuration.suitabilityDataPath, Configuration.maow_ToolboxPath, self.outputWorkspace])
示例12: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(".....IncidentHotSpotsTestCase.setUp")
UnitTestUtilities.checkArcPy()
Configuration.incidentDataPath = DataDownload.runDataDownload(Configuration.patternsPaths, Configuration.incidentGDBName, Configuration.incidentURL)
if (Configuration.incidentScratchGDB == None) or (not arcpy.Exists(Configuration.incidentScratchGDB)):
Configuration.incidentScratchGDB = UnitTestUtilities.createScratch(Configuration.incidentDataPath)
Configuration.incidentInputGDB = os.path.join(Configuration.incidentDataPath, Configuration.incidentGDBName)
UnitTestUtilities.checkFilePaths([Configuration.incidentDataPath, Configuration.incidentInputGDB, Configuration.patterns_ProToolboxPath, Configuration.patterns_DesktopToolboxPath])
self.inputPointFeatures = os.path.join(Configuration.incidentInputGDB, "Incidents")
self.inputBoundaryFeatures = os.path.join(Configuration.incidentInputGDB, "Districts")
示例13: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(" FindSubmarinesTestCase.setUp")
UnitTestUtilities.checkArcPy()
Configuration.maritimeDataPath = DataDownload.runDataDownload(Configuration.suitabilityPaths, Configuration.maritimeGDBName, Configuration.maritimeURL)
if(Configuration.maritimeScratchGDB == None) or (not arcpy.Exists(Configuration.maritimeScratchGDB)):
Configuration.maritimeScratchGDB = UnitTestUtilities.createScratch(Configuration.maritimeDataPath)
self.useableCanyons = os.path.join(Configuration.maritimeScratchGDB, "canyonsOutput")
UnitTestUtilities.checkFilePaths([Configuration.maritimeDataPath, Configuration.maritime_DesktopToolboxPath, Configuration.maritime_ProToolboxPath])
示例14: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
if Configuration.DEBUG == True: print(" FarthestOnCircleTestCase.setUp")
UnitTestUtilities.checkArcPy()
Configuration.maritimeDataPath = DataDownload.runDataDownload(Configuration.suitabilityPaths, Configuration.maritimeGDBName, Configuration.maritimeURL)
if(Configuration.maritimeScratchGDB == None) or (not arcpy.Exists(Configuration.maritimeScratchGDB)):
Configuration.maritimeScratchGDB = UnitTestUtilities.createScratch(Configuration.maritimeDataPath)
self.maritimeDataGDB = os.path.join(Configuration.maritimeDataPath, "Maritime Decision Aid Tools.gdb")
self.position = os.path.join(self.maritimeDataGDB, "Vessel")
self.hoursOfTransit = os.path.join(Configuration.maritimeScratchGDB, "hoursOutput")
UnitTestUtilities.checkFilePaths([Configuration.maritimeDataPath, Configuration.maritime_DesktopToolboxPath, Configuration.maritime_ProToolboxPath])
示例15: setUp
# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import checkArcPy [as 别名]
def setUp(self):
''' set-up code '''
if Configuration.DEBUG:
print(".....ERGScript.setUp")
UnitTestUtilities.checkArcPy()
UnitTestUtilities.checkFilePaths([self.scriptFolderPath,
self.testDataFolderPath])
# Check the test inputs (do they exist? or not?)
if (self.scratchGDB == None) or (not arcpy.Exists(self.scratchGDB)):
self.scratchGDB = UnitTestUtilities.createScratch(self.testDataFolderPath)
UnitTestUtilities.checkGeoObjects([self.scratchGDB, self.dbfFolderPath])
return