当前位置: 首页>>代码示例>>Python>>正文


Python UnitTestUtilities.createScratch方法代码示例

本文整理汇总了Python中UnitTestUtilities.createScratch方法的典型用法代码示例。如果您正苦于以下问题:Python UnitTestUtilities.createScratch方法的具体用法?Python UnitTestUtilities.createScratch怎么用?Python UnitTestUtilities.createScratch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnitTestUtilities的用法示例。


在下文中一共展示了UnitTestUtilities.createScratch方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [as 别名]
 def setUp(self):
     if Configuration.DEBUG == True: print("     IncidentTableToPointTestCase.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])
     if (Configuration.incidentScratchGDB == None) or (not arcpy.Exists(Configuration.incidentScratchGDB)):
         Configuration.incidentScratchGDB = UnitTestUtilities.createScratch(Configuration.incidentDataPath)
         
     self.inputTable = os.path.join(Configuration.incidentInputGDB, "MontereyIncidents")
开发者ID:weepingdog,项目名称:solutions-geoprocessing-toolbox,代码行数:16,代码来源:IncidentTableToPointTestCase.py

示例2: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [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

示例3: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [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])
开发者ID:Esri,项目名称:solutions-geoprocessing-toolbox,代码行数:28,代码来源:HotSpotsByAreaTestCase.py

示例4: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [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])
开发者ID:Esri,项目名称:solutions-geoprocessing-toolbox,代码行数:32,代码来源:SunPositionAndHillshadeTestCase.py

示例5: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [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
开发者ID:weepingdog,项目名称:solutions-geoprocessing-toolbox,代码行数:32,代码来源:HLZTouchdownPointsTestCase.py

示例6: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [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

示例7: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [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

示例8: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [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])
开发者ID:NatalieCampos,项目名称:solutions-geoprocessing-toolbox,代码行数:12,代码来源:FindSubmarinesTestCase.py

示例9: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [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")
开发者ID:NatalieCampos,项目名称:solutions-geoprocessing-toolbox,代码行数:12,代码来源:IncidentHotSpotsTestCase.py

示例10: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [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])
开发者ID:NatalieCampos,项目名称:solutions-geoprocessing-toolbox,代码行数:15,代码来源:FarthestOnCircleTestCase.py

示例11: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [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
开发者ID:NatalieCampos,项目名称:solutions-geoprocessing-toolbox,代码行数:15,代码来源:ERGScriptTestCase.py

示例12: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [as 别名]
 def setUp(self):
     if Configuration.DEBUG == True: print("     SubDepthRestrictionSuitabilityTestCase.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.bathymetry = os.path.join(self.maritimeDataGDB, "SoCalDepthsGEBCO")
     self.subDepthOutput = os.path.join(Configuration.maritimeScratchGDB, "SubDepth")
     UnitTestUtilities.checkFilePaths([Configuration.maritimeDataPath, Configuration.maritime_DesktopToolboxPath, Configuration.maritime_ProToolboxPath])
开发者ID:NatalieCampos,项目名称:solutions-geoprocessing-toolbox,代码行数:15,代码来源:SubDepthRestrictionSuitabilityTestCase.py

示例13: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [as 别名]
 def setUp(self):
     if Configuration.DEBUG == True: print("     VisibilityRangeAtSeaTestCase.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.visibleRange = os.path.join(Configuration.maritimeScratchGDB, "visRangeOutput")
     self.vessel = os.path.join(Configuration.maritimeScratchGDB, "vesselOutput")
     self.shipLocation = os.path.join(self.maritimeDataGDB, "Vessel")
     
     UnitTestUtilities.checkFilePaths([Configuration.maritimeDataPath, Configuration.maritime_DesktopToolboxPath, Configuration.maritime_ProToolboxPath])
开发者ID:NatalieCampos,项目名称:solutions-geoprocessing-toolbox,代码行数:17,代码来源:VisibilityRangeAtSeaTestCase.py

示例14: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [as 别名]
    def setUp(self):
        if Configuration.DEBUG == True: print("         SunPositionAndHillshadeTestCase.setUp")
        UnitTestUtilities.checkArcPy()

        name = "test_sun_position.gdb"
        self.sunPosDataPath = DataDownload.runDataDownload(Configuration.visibilityPaths, name, self.sunPosUrl)
        if (self.scratchGDB == None) or (not arcpy.Exists(self.scratchGDB)):
            self.scratchGDB = UnitTestUtilities.createScratch(self.sunPosDataPath)

        UnitTestUtilities.checkFilePaths([self.proToolboxPath, self.desktopToolboxPath, Configuration.visibilityPaths, self.sunPosDataPath])
        # set up inputs
        self.sunPosGDBPath = os.path.join(self.sunPosDataPath, name)
        self.inputArea = os.path.join(self.sunPosGDBPath, r"inputArea")
        self.inputSurface = os.path.join(self.sunPosGDBPath, r"Jbad_SRTM_USGS_EROS")
        self.compareResults = os.path.join(self.sunPosGDBPath, r"compareResults")
        UnitTestUtilities.checkGeoObjects([self.inputArea, self.inputSurface, self.compareResults])
开发者ID:NatalieCampos,项目名称:solutions-geoprocessing-toolbox,代码行数:18,代码来源:SunPositionAndHillshadeTestCase.py

示例15: setUp

# 需要导入模块: import UnitTestUtilities [as 别名]
# 或者: from UnitTestUtilities import createScratch [as 别名]
 def setUp(self):
     if Configuration.DEBUG == True: print(".....CountIncidentsByLOCTestCase.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)
     Configuration.incidentResultGDB = os.path.join(Configuration.incidentDataPath, Configuration.incidentResultGDBName)
     
     UnitTestUtilities.checkFilePaths([Configuration.incidentDataPath, Configuration.incidentInputGDB, Configuration.patterns_ProToolboxPath, Configuration.patterns_DesktopToolboxPath])
  
     # 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")
开发者ID:NatalieCampos,项目名称:solutions-geoprocessing-toolbox,代码行数:19,代码来源:CountIncidentsByLOCTestCase.py


注:本文中的UnitTestUtilities.createScratch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。