def test_local_peaks(self):
        try:
            arcpy.AddMessage("Testing Find Local Peaks (unit).")
            if arcpy.CheckExtension("Spatial") == "Available":
                arcpy.CheckOutExtension("Spatial")
            else:
                raise Exception("LicenseError")
                
            print("Importing Visibility and Range Toolbox...")
            arcpy.ImportToolbox(Configuration.visandRangeToolbox, "VandR")
            arcpy.env.overwriteOutput = True

            inputFeatureCount = int(arcpy.GetCount_management(self.inputPolygonFC).getOutput(0)) 
            print("Input FeatureClass: " + str(self.inputPolygonFC))
            print("Input Feature Count: " +  str(inputFeatureCount))
            
            self.assertTrue(inputFeatureCount > 0)
            
            # if (inputFeatureCount < 1):
                # print("Invalid Input Feature Count: " +  str(inputFeatureCount))
           
            numberOfPeaks = 3
           
            ########################################################
            # Execute the Model under test:   
            arcpy.FindLocalPeaks_VandR(self.inputPolygonFC, numberOfPeaks, self.inputSurface, self.outputPointsFC)
            ########################################################
    
            # Verify the results    
            outputFeatureCount = int(arcpy.GetCount_management(self.outputPointsFC).getOutput(0)) 
            print("Output FeatureClass: " + str(self.outputPointsFC))
            print("Output Feature Count: " +  str(outputFeatureCount))
            self.assertEqual(outputFeatureCount, 3)       
            
            # if (outputPointsFC < 3):
                # print("Invalid Output Feature Count: " +  str(outputFeatureCount))
                # raise Exception("Test Failed")
                
        except arcpy.ExecuteError:
            UnitTestUtilities.handleArcPyError()
            
        except:
            UnitTestUtilities.handleGeneralError()
        
        finally:
            arcpy.CheckInExtension("Spatial")
dataset/ETHPy150Open Esri/solutions-geoprocessing-toolbox/utils/test/visibility_tests/FindLocalPeaksTestCase.py/FindLocalPeaksTestCase.test_local_peaks/original