<s> import arcpy <EOL> import os <EOL> import sys <EOL> import traceback <EOL> import TestUtilities <EOL> def RunTest ( ) : <EOL> try : <EOL> arcpy . AddMessage ( "<STR_LIT>" ) <EOL> inputTrackPointsFC = os . path . join ( TestUtilities . inputGDB , "<STR_LIT>" ) <EOL> outputPointsFC = os . path . join ( TestUtilities . outputGDB , "<STR_LIT>" ) <EOL> try : <EOL> desc = arcpy . Describe ( outputPointsFC ) <EOL> if desc != None : <EOL> print ( "<STR_LIT>" + str ( outputPointsFC ) ) <EOL> arcpy . Delete_management ( outputPointsFC ) <EOL> except : <EOL> print ( "<STR_LIT>" + str ( outputPointsFC ) ) <EOL> try : <EOL> print ( "<STR_LIT>" + str ( inputTrackPointsFC ) + "<STR_LIT>" + str ( outputPointsFC ) ) <EOL> arcpy . Copy_management ( inputTrackPointsFC , outputPointsFC ) <EOL> except : <EOL> print ( "<STR_LIT>" + str ( inputTrackPointsFC ) + "<STR_LIT::>" + str ( outputPointsFC ) ) <EOL> toolbox = TestUtilities . toolbox <EOL> print ( "<STR_LIT>" + str ( TestUtilities . currentPath ) ) <EOL> print ( "<STR_LIT>" + str ( TestUtilities . geodatabasePath ) ) <EOL> arcpy . env . overwriteOutput = True <EOL> arcpy . ImportToolbox ( toolbox , "<STR_LIT>" ) <EOL> arcpy . RemoveDuplicateGPSData_pdc ( outputPointsFC ) <EOL> inputFeatureCount = int ( arcpy . GetCount_management ( inputTrackPointsFC ) . getOutput ( <NUM_LIT:0> ) ) <EOL> print ( "<STR_LIT>" + str ( inputTrackPointsFC ) ) <EOL> print ( "<STR_LIT>" + str ( inputFeatureCount ) ) <EOL> if ( inputFeatureCount < <NUM_LIT:1> ) : <EOL> print ( "<STR_LIT>" + str ( inputFeatureCount ) ) <EOL> raise Exception ( "<STR_LIT>" ) <EOL> outputFeatureCount = int ( arcpy . GetCount_management ( outputPointsFC ) . getOutput ( <NUM_LIT:0> ) ) <EOL> print ( "<STR_LIT>" + str ( outputPointsFC ) ) <EOL> print ( "<STR_LIT>" + str ( outputFeatureCount ) ) <EOL> if ( outputFeatureCount >= inputFeatureCount ) : <EOL> print ( "<STR_LIT>" + str ( outputFeatureCount ) ) <EOL> raise Exception ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> except arcpy . ExecuteError : <EOL> msgs = arcpy . GetMessages ( ) <EOL> arcpy . AddError ( msgs ) <EOL> sys . exit ( - <NUM_LIT:1> ) <EOL> except Exception as e : <EOL> tb = sys . exc_info ( ) [ <NUM_LIT:2> ] <EOL> tbinfo = traceback . format_tb ( tb ) [ <NUM_LIT:0> ] <EOL> pymsg = "<STR_LIT>" + tbinfo + "<STR_LIT>" + str ( sys . exc_info ( ) [ <NUM_LIT:1> ] ) <EOL> msgs = "<STR_LIT>" + arcpy . GetMessages ( ) + "<STR_LIT:\n>" <EOL> arcpy . AddError ( pymsg ) <EOL> arcpy . AddError ( msgs ) <EOL> sys . exit ( - <NUM_LIT:1> ) <EOL> RunTest ( ) </s>
