<s> import os <EOL> import logging <EOL> import arcpy <EOL> import unittest <EOL> import Configuration <EOL> import UnitTestUtilities <EOL> class FindLocalPeaksTestCase ( unittest . TestCase ) : <EOL> visGDB = os . path . join ( Configuration . vis_GeodatabasePath , "<STR_LIT>" ) <EOL> inputPolygonFC = os . path . join ( visGDB , "<STR_LIT>" ) <EOL> inputSurface = os . path . join ( visGDB , "<STR_LIT>" ) <EOL> outputPointsFC = os . path . join ( Configuration . vis_ScratchPath , "<STR_LIT>" ) <EOL> def setUp ( self ) : <EOL> UnitTestCase . UnitTestCase . setUp ( self ) <EOL> testObjects = [ Configuration . visandRangeToolbox , self . visGDB , self . inputPolygonFC , self . inputSurface ] <EOL> UnitTestUtilities . checkGeoObjects ( testObjects ) <EOL> UnitTestUtilities . createScratch ( Configuration . vis_ScratchPath ) <EOL> def test_local_peaks ( self ) : <EOL> try : <EOL> arcpy . AddMessage ( "<STR_LIT>" ) <EOL> if arcpy . CheckExtension ( "<STR_LIT>" ) == "<STR_LIT>" : <EOL> arcpy . CheckOutExtension ( "<STR_LIT>" ) <EOL> else : <EOL> raise Exception ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> arcpy . ImportToolbox ( Configuration . visandRangeToolbox , "<STR_LIT>" ) <EOL> arcpy . env . overwriteOutput = True <EOL> inputFeatureCount = int ( arcpy . GetCount_management ( self . inputPolygonFC ) . getOutput ( <NUM_LIT:0> ) ) <EOL> print ( "<STR_LIT>" + str ( self . inputPolygonFC ) ) <EOL> print ( "<STR_LIT>" + str ( inputFeatureCount ) ) <EOL> self . assertTrue ( inputFeatureCount > <NUM_LIT:0> ) <EOL> numberOfPeaks = <NUM_LIT:3> <EOL> arcpy . FindLocalPeaks_VandR ( self . inputPolygonFC , numberOfPeaks , self . inputSurface , self . outputPointsFC ) <EOL> outputFeatureCount = int ( arcpy . GetCount_management ( self . outputPointsFC ) . getOutput ( <NUM_LIT:0> ) ) <EOL> print ( "<STR_LIT>" + str ( self . outputPointsFC ) ) <EOL> print ( "<STR_LIT>" + str ( outputFeatureCount ) ) <EOL> self . assertEqual ( outputFeatureCount , <NUM_LIT:3> ) <EOL> except arcpy . ExecuteError : <EOL> UnitTestUtilities . handleArcPyError ( ) <EOL> except : <EOL> UnitTestUtilities . handleGeneralError ( ) <EOL> finally : <EOL> arcpy . CheckInExtension ( "<STR_LIT>" ) </s>
