@@ -25,6 +25,7 @@ class TestTypeAliasPatterns:
2525 ("uint16" , "UINT16" ),
2626 ("int8" , "INT8" ),
2727 ("uint8" , "UINT8" ),
28+ ("bool" , "BOOL" ),
2829 ],
2930 )
3031 def test_type_alias_pattern_matching (self , alias , expected_category ):
@@ -47,6 +48,7 @@ def test_type_alias_pattern_matching(self, alias, expected_category):
4748 ("uint16" , "smallint unsigned" ),
4849 ("int8" , "tinyint" ),
4950 ("uint8" , "tinyint unsigned" ),
51+ ("bool" , "tinyint" ),
5052 ],
5153 )
5254 def test_type_alias_mysql_mapping (self , alias , expected_mysql_type ):
@@ -107,6 +109,7 @@ def test_heading_preserves_type_aliases(self, schema_type_aliases):
107109 assert "uint16" in heading_str
108110 assert "int8" in heading_str
109111 assert "uint8" in heading_str
112+ assert "bool" in heading_str
110113
111114
112115class TestTypeAliasInsertFetch :
@@ -129,6 +132,7 @@ def test_insert_and_fetch(self, schema_type_aliases):
129132 val_uint16 = 65535 , # max uint16
130133 val_int8 = 127 , # max int8
131134 val_uint8 = 255 , # max uint8
135+ val_bool = 1 , # boolean true
132136 )
133137
134138 table .insert1 (test_data )
@@ -145,6 +149,7 @@ def test_insert_and_fetch(self, schema_type_aliases):
145149 assert fetched ["val_uint16" ] == test_data ["val_uint16" ]
146150 assert fetched ["val_int8" ] == test_data ["val_int8" ]
147151 assert fetched ["val_uint8" ] == test_data ["val_uint8" ]
152+ assert fetched ["val_bool" ] == test_data ["val_bool" ]
148153
149154 def test_insert_primary_key_with_aliases (self , schema_type_aliases ):
150155 """Test using type aliases in primary key."""
0 commit comments