@@ -586,6 +586,9 @@ def otype(x):
586586 assert row ['tinyint' ] == 80 , row ['tinyint' ]
587587 assert typ ['tinyint' ] == otype (1 ), typ ['tinyint' ]
588588
589+ assert row ['unsigned_tinyint' ] == 85 , row ['unsigned_tinyint' ]
590+ assert typ ['unsigned_tinyint' ] == otype (1 ), typ ['unsigned_tinyint' ]
591+
589592 assert row ['bool' ] == 0 , row ['bool' ]
590593 assert typ ['bool' ] == otype (1 ), typ ['bool' ]
591594
@@ -595,21 +598,39 @@ def otype(x):
595598 assert row ['smallint' ] == - 27897 , row ['smallint' ]
596599 assert typ ['smallint' ] == otype (2 ), typ ['smallint' ]
597600
601+ assert row ['unsigned_smallint' ] == 27897 , row ['unsigned_smallint' ]
602+ assert typ ['unsigned_smallint' ] == otype (2 ), typ ['unsigned_smallint' ]
603+
598604 assert row ['mediumint' ] == 104729 , row ['mediumint' ]
599605 assert typ ['mediumint' ] == otype (9 ), typ ['mediumint' ]
600606
607+ assert row ['unsigned_mediumint' ] == 120999 , row ['unsigned_mediumint' ]
608+ assert typ ['unsigned_mediumint' ] == otype (9 ), typ ['unsigned_mediumint' ]
609+
601610 assert row ['int24' ] == - 200899 , row ['int24' ]
602611 assert typ ['int24' ] == otype (9 ), typ ['int24' ]
603612
613+ assert row ['unsigned_int24' ] == 407709 , row ['unsigned_int24' ]
614+ assert typ ['unsigned_int24' ] == otype (9 ), typ ['unsigned_int24' ]
615+
604616 assert row ['int' ] == - 1295369311 , row ['int' ]
605617 assert typ ['int' ] == otype (3 ), typ ['int' ]
606618
619+ assert row ['unsigned_int' ] == 3872362332 , row ['unsigned_int' ]
620+ assert typ ['unsigned_int' ] == otype (3 ), typ ['unsigned_int' ]
621+
607622 assert row ['integer' ] == - 1741727421 , row ['integer' ]
608623 assert typ ['integer' ] == otype (3 ), typ ['integer' ]
609624
625+ assert row ['unsigned_integer' ] == 3198387363 , row ['unsigned_integer' ]
626+ assert typ ['unsigned_integer' ] == otype (3 ), typ ['unsigned_integer' ]
627+
610628 assert row ['bigint' ] == - 266883847 , row ['bigint' ]
611629 assert typ ['bigint' ] == otype (8 ), typ ['bigint' ]
612630
631+ assert row ['unsigned_bigint' ] == 980007287362 , row ['unsigned_bigint' ]
632+ assert typ ['unsigned_bigint' ] == otype (8 ), typ ['unsigned_bigint' ]
633+
613634 assert row ['float' ] == - 146487000.0 , row ['float' ]
614635 assert typ ['float' ] == otype (4 ), typ ['float' ]
615636
@@ -658,7 +679,7 @@ def otype(x):
658679 assert row ['datetime_6' ] == datetime .datetime (
659680 1756 , 10 , 29 , 2 , 2 , 42 , 8 ,
660681 ), row ['datetime_6' ]
661- assert typ ['datetime ' ] == 12 , typ ['datetime ' ]
682+ assert typ ['datetime_6 ' ] == 12 , typ ['datetime_6 ' ]
662683
663684 assert row ['timestamp' ] == datetime .datetime (
664685 1980 , 12 , 31 , 1 , 10 , 23 ,
@@ -1455,13 +1476,16 @@ def upper(x):
14551476
14561477 def test_results_format (self ):
14571478 columns = [
1458- 'id' , 'tinyint' , 'bool' , 'boolean' , 'smallint' , 'mediumint' ,
1459- 'int24' , 'int' , 'integer' , 'bigint' , 'float' , 'double' , 'real' ,
1460- 'decimal' , 'dec' , 'fixed' , 'numeric' , 'date' , 'time' , 'time_6' ,
1461- 'datetime' , 'datetime_6' , 'timestamp' , 'timestamp_6' , 'year' ,
1462- 'char_100' , 'binary_100' , 'varchar_200' , 'varbinary_200' ,
1463- 'longtext' , 'mediumtext' , 'text' , 'tinytext' , 'longblob' ,
1464- 'mediumblob' , 'blob' , 'tinyblob' , 'json' , 'enum' , 'set' , 'bit' ,
1479+ 'id' , 'tinyint' , 'unsigned_tinyint' , 'bool' , 'boolean' ,
1480+ 'smallint' , 'unsigned_smallint' , 'mediumint' , 'unsigned_mediumint' ,
1481+ 'int24' , 'unsigned_int24' , 'int' , 'unsigned_int' ,
1482+ 'integer' , 'unsigned_integer' , 'bigint' , 'unsigned_bigint' ,
1483+ 'float' , 'double' , 'real' , 'decimal' , 'dec' , 'fixed' , 'numeric' ,
1484+ 'date' , 'time' , 'time_6' , 'datetime' , 'datetime_6' , 'timestamp' ,
1485+ 'timestamp_6' , 'year' , 'char_100' , 'binary_100' , 'varchar_200' ,
1486+ 'varbinary_200' , 'longtext' , 'mediumtext' , 'text' , 'tinytext' ,
1487+ 'longblob' , 'mediumblob' , 'blob' , 'tinyblob' , 'json' , 'enum' ,
1488+ 'set' , 'bit' ,
14651489 ]
14661490
14671491 with s2 .connect (database = type (self ).dbname , results_format = 'tuple' ) as conn :
0 commit comments