#NEWLINE# @ testing . fails_on ( '+zxjdbc' , "Can't infer the SQL type to use for an instance of org.python.core.PyObjectDerived." ) #NEWLINE# def test_extract( self ) : #NEWLINE# #INDENT# fivedaysago = ( datetime . datetime . now ( ) - datetime . timedelta ( days = 5 ) ) #NEWLINE# for ( field , exp ) in ( ( 'year' , self . year ) , ( 'month' , fivedaysago . month ) , ( 'day' , fivedaysago . day ) ) : #NEWLINE# #INDENT# r = testing . db . execute ( select ( [ extract ( field , ( func . now ( ) + datetime . timedelta ( days = ( - 5 ) ) ) ) ] ) ) . scalar ( ) #NEWLINE# eq_ ( r , exp )