1111from psqlpy ._internal .extra_types import PyCustomType
1212from psqlpy .extra_types import (
1313 BigInt ,
14+ Float32 ,
15+ Float64 ,
1416 Integer ,
1517 PyJSON ,
1618 PyJSONB ,
@@ -74,6 +76,8 @@ async def test_as_class(
7476 ("INT4" , Integer (121231231 ), 121231231 ),
7577 ("INT8" , BigInt (99999999999999999 ), 99999999999999999 ),
7678 ("FLOAT4" , 32.12329864501953 , 32.12329864501953 ),
79+ ("FLOAT4" , Float32 (32.12329864501953 ), 32.12329864501953 ),
80+ ("FLOAT8" , Float64 (32.12329864501953 ), 32.12329864501953 ),
7781 ("DATE" , now_datetime .date (), now_datetime .date ()),
7882 ("TIME" , now_datetime .time (), now_datetime .time ()),
7983 ("TIMESTAMP" , now_datetime , now_datetime ),
@@ -288,6 +292,7 @@ async def test_deserialization_composite_into_python(
288292 int4_ INT4,
289293 int8_ INT8,
290294 flaot4_ FLOAT4,
295+ flaot8_ FLOAT8,
291296 date_ DATE,
292297 time_ TIME,
293298 timestamp_ TIMESTAMP,
@@ -325,7 +330,7 @@ async def test_deserialization_composite_into_python(
325330 querystring = create_table_query ,
326331 )
327332 await psql_pool .execute (
328- querystring = "INSERT INTO for_test VALUES (ROW($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31))" , # noqa: E501
333+ querystring = "INSERT INTO for_test VALUES (ROW($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32 ))" , # noqa: E501
329334 parameters = [
330335 b"Bytes" ,
331336 "Some String" ,
@@ -335,6 +340,7 @@ async def test_deserialization_composite_into_python(
335340 Integer (199 ),
336341 BigInt (10001 ),
337342 32.12329864501953 ,
343+ Float64 (32.12329864501953 ),
338344 now_datetime .date (),
339345 now_datetime .time (),
340346 now_datetime ,
@@ -400,6 +406,7 @@ class ValidateModelForCustomType(BaseModel):
400406 int4_ : int
401407 int8_ : int
402408 flaot4_ : float
409+ flaot8_ : float
403410 date_ : datetime .date
404411 time_ : datetime .time
405412 timestamp_ : datetime .datetime
0 commit comments