#NEWLINE# def runTest( self ) : #NEWLINE# #INDENT# shapepoint = transitfeed . ShapePoint ( '' , 36.91572 , ( - 116.7156 ) , 0 , 0 ) #NEWLINE# self . ExpectMissingValueInClosure ( 'shape_id' , ( lambda : shapepoint . ParseAttributes ( self . problems ) ) ) #NEWLINE# shapepoint = transitfeed . ShapePoint ( 'T' , '36.9151' , '-116.7611' , '00' , '0' ) #NEWLINE# shapepoint . ParseAttributes ( self . problems ) #NEWLINE# e = self . accumulator . PopException ( 'InvalidNonNegativeIntegerValue' ) #NEWLINE# self . assertMatchesRegex ( 'not have a leading zero' , e . FormatProblem ( ) ) #NEWLINE# self . accumulator . AssertNoMoreExceptions ( ) #NEWLINE# shapepoint = transitfeed . ShapePoint ( 'T' , '36.9151' , '-116.7611' , ( - 1 ) , '0' ) #NEWLINE# shapepoint . ParseAttributes ( self . problems ) #NEWLINE# e = self . accumulator . PopException ( 'InvalidValue' ) #NEWLINE# self . assertMatchesRegex ( 'Value should be a number' , e . FormatProblem ( ) ) #NEWLINE# self . accumulator . AssertNoMoreExceptions ( ) #NEWLINE# shapepoint = transitfeed . ShapePoint ( 'T' , '0.1' , '0.1' , '1' , '0' ) #NEWLINE# shapepoint . ParseAttributes ( e . problems ) #NEWLINE# e = self . accumulator . PopException ( 'InvalidValue' ) #NEWLINE# self . assertMatchesRegex ( 'too close to 0, 0,' , e . FormatProblem ( ) ) #NEWLINE# self . accumulator . AssertNoMoreExceptions ( ) #NEWLINE# shapepoint = transitfeed . ShapePoint ( 'T' , '36.9151' , '-116.7611' , '0' , '' ) #NEWLINE# shapepoint . ParseAttributes ( self . problems ) #NEWLINE# shapepoint = transitfeed . ShapePoint ( 'T' , '36.9151' , '-116.7611' , '0' , '-1' ) #NEWLINE# shapepoint . ParseAttributes ( self . problems ) #NEWLINE# e = self . accumulator . PopException ( 'InvalidValue' ) #NEWLINE# self . assertMatchesRegex ( 'Invalid value -1.0' , e . FormatProblem ( ) ) #NEWLINE# self . assertMatchesRegex ( 'should be a positive number' , e . FormatProblem ( ) ) #NEWLINE# self . accumulator . AssertNoMoreExceptions ( )