@@ -527,23 +527,27 @@ def test_time_query_param(trino_connection):
527527
528528
529529def test_time_with_named_time_zone_query_param (trino_connection ):
530- with pytest .raises (trino .exceptions .NotSupportedError ):
531- cur = trino_connection .cursor ()
530+ cur = trino_connection .cursor ()
532531
533- params = time (16 , 43 , 22 , 320000 , tzinfo = pytz .timezone ('Asia/Shanghai' ))
532+ params = time (16 , 43 , 22 , 320000 , tzinfo = pytz .timezone ('Asia/Shanghai' ))
534533
535- cur .execute ("SELECT ?" , params = (params ,))
534+ cur .execute ("SELECT ?" , params = (params ,))
535+ rows = cur .fetchall ()
536+
537+ # Asia/Shanghai
538+ assert rows [0 ][0 ].tzinfo == timezone (timedelta (seconds = 28800 ))
536539
537540
538541def test_time_with_numeric_offset_time_zone_query_param (trino_connection ):
539- with pytest .raises (trino .exceptions .NotSupportedError ):
540- cur = trino_connection .cursor ()
542+ cur = trino_connection .cursor ()
541543
542- tz = timezone (- timedelta (hours = 8 , minutes = 0 ))
544+ tz = timezone (- timedelta (hours = 8 , minutes = 0 ))
545+ params = time (16 , 43 , 22 , 320000 , tzinfo = tz )
543546
544- params = time (16 , 43 , 22 , 320000 , tzinfo = tz )
547+ cur .execute ("SELECT ?" , params = (params ,))
548+ rows = cur .fetchall ()
545549
546- cur . execute ( "SELECT ?" , params = ( params ,))
550+ assert rows [ 0 ][ 0 ] == params
547551
548552
549553def test_time (trino_connection ):
0 commit comments