<s> import arcpy <EOL> import sys <EOL> import traceback <EOL> import TestUtilities <EOL> import os <EOL> class LicenseError ( Exception ) : <EOL> pass <EOL> try : <EOL> arcpy . ImportToolbox ( TestUtilities . toolbox ) <EOL> arcpy . env . overwriteOutput = True <EOL> productLevel = arcpy . CheckProduct ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" + productLevel ) <EOL> if ( productLevel == "<STR_LIT>" ) : <EOL> import arcinfo <EOL> elif ( productLevel != "<STR_LIT>" ) and ( productLevel != "<STR_LIT>" ) : <EOL> raise Exception ( "<STR_LIT>" ) <EOL> inputUTDSRoadFeatures = os . path . join ( TestUtilities . inputGDB , "<STR_LIT>" ) <EOL> outputSplitRoadFeatures = os . path . join ( TestUtilities . outputGDB , "<STR_LIT>" ) <EOL> arcpy . AddMessage ( "<STR_LIT>" ) <EOL> arcpy . SplitLinesAtIntersections_netprep ( inputUTDSRoadFeatures , outputSplitRoadFeatures ) <EOL> countBeforeRoadFeatures = int ( arcpy . GetCount_management ( inputUTDSRoadFeatures ) . getOutput ( <NUM_LIT:0> ) ) <EOL> print ( "<STR_LIT>" + str ( countBeforeRoadFeatures ) ) <EOL> countAfterRoadFeatures = int ( arcpy . GetCount_management ( outputSplitRoadFeatures ) . getOutput ( <NUM_LIT:0> ) ) <EOL> print ( "<STR_LIT>" + str ( countAfterRoadFeatures ) ) <EOL> if ( countBeforeRoadFeatures >= countAfterRoadFeatures ) : <EOL> print ( "<STR_LIT>" ) <EOL> raise Exception ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> except arcpy . ExecuteError : <EOL> msgs = arcpy . GetMessages ( ) <EOL> arcpy . AddError ( msgs ) <EOL> print ( msgs ) <EOL> sys . exit ( - <NUM_LIT:1> ) <EOL> except : <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> print ( pymsg + "<STR_LIT:\n>" ) <EOL> print ( msgs ) <EOL> sys . exit ( - <NUM_LIT:1> ) <EOL> finally : <EOL> if arcpy . CheckExtension ( "<STR_LIT>" ) == "<STR_LIT>" : <EOL> arcpy . CheckInExtension ( "<STR_LIT>" ) </s>
