@@ -185,54 +185,103 @@ async def test_as_class(
185185 ["Some String" , "Some String" ],
186186 ),
187187 ("BOOL ARRAY" , [True , False ], [True , False ]),
188+ ("BOOL ARRAY" , [[True ], [False ]], [[True ], [False ]]),
188189 ("INT2 ARRAY" , [SmallInt (12 ), SmallInt (100 )], [12 , 100 ]),
190+ ("INT2 ARRAY" , [[SmallInt (12 )], [SmallInt (100 )]], [[12 ], [100 ]]),
189191 ("INT4 ARRAY" , [Integer (121231231 ), Integer (121231231 )], [121231231 , 121231231 ]),
192+ ("INT4 ARRAY" , [[Integer (121231231 )], [Integer (121231231 )]], [[121231231 ], [121231231 ]]),
190193 (
191194 "INT8 ARRAY" ,
192195 [BigInt (99999999999999999 ), BigInt (99999999999999999 )],
193196 [99999999999999999 , 99999999999999999 ],
194197 ),
198+ (
199+ "INT8 ARRAY" ,
200+ [[BigInt (99999999999999999 )], [BigInt (99999999999999999 )]],
201+ [[99999999999999999 ], [99999999999999999 ]],
202+ ),
195203 (
196204 "MONEY ARRAY" ,
197205 [Money (99999999999999999 ), Money (99999999999999999 )],
198206 [99999999999999999 , 99999999999999999 ],
199207 ),
208+ (
209+ "MONEY ARRAY" ,
210+ [[Money (99999999999999999 )], [Money (99999999999999999 )]],
211+ [[99999999999999999 ], [99999999999999999 ]],
212+ ),
200213 (
201214 "NUMERIC(5, 2) ARRAY" ,
202215 [Decimal ("121.23" ), Decimal ("188.99" )],
203216 [Decimal ("121.23" ), Decimal ("188.99" )],
204217 ),
218+ (
219+ "NUMERIC(5, 2) ARRAY" ,
220+ [[Decimal ("121.23" )], [Decimal ("188.99" )]],
221+ [[Decimal ("121.23" )], [Decimal ("188.99" )]],
222+ ),
205223 (
206224 "FLOAT8 ARRAY" ,
207225 [32.12329864501953 , 32.12329864501953 ],
208226 [32.12329864501953 , 32.12329864501953 ],
209227 ),
228+ (
229+ "FLOAT8 ARRAY" ,
230+ [[32.12329864501953 ], [32.12329864501953 ]],
231+ [[32.12329864501953 ], [32.12329864501953 ]],
232+ ),
210233 (
211234 "DATE ARRAY" ,
212235 [now_datetime .date (), now_datetime .date ()],
213236 [now_datetime .date (), now_datetime .date ()],
214237 ),
238+ (
239+ "DATE ARRAY" ,
240+ [[now_datetime .date ()], [now_datetime .date ()]],
241+ [[now_datetime .date ()], [now_datetime .date ()]],
242+ ),
215243 (
216244 "TIME ARRAY" ,
217245 [now_datetime .time (), now_datetime .time ()],
218246 [now_datetime .time (), now_datetime .time ()],
219247 ),
248+ (
249+ "TIME ARRAY" ,
250+ [[now_datetime .time ()], [now_datetime .time ()]],
251+ [[now_datetime .time ()], [now_datetime .time ()]],
252+ ),
220253 ("TIMESTAMP ARRAY" , [now_datetime , now_datetime ], [now_datetime , now_datetime ]),
254+ ("TIMESTAMP ARRAY" , [[now_datetime ], [now_datetime ]], [[now_datetime ], [now_datetime ]]),
221255 (
222256 "TIMESTAMPTZ ARRAY" ,
223257 [now_datetime_with_tz , now_datetime_with_tz ],
224258 [now_datetime_with_tz , now_datetime_with_tz ],
225259 ),
260+ (
261+ "TIMESTAMPTZ ARRAY" ,
262+ [[now_datetime_with_tz ], [now_datetime_with_tz ]],
263+ [[now_datetime_with_tz ], [now_datetime_with_tz ]],
264+ ),
226265 (
227266 "UUID ARRAY" ,
228267 [uuid_ , uuid_ ],
229268 [str (uuid_ ), str (uuid_ )],
230269 ),
270+ (
271+ "UUID ARRAY" ,
272+ [[uuid_ ], [uuid_ ]],
273+ [[str (uuid_ )], [str (uuid_ )]],
274+ ),
231275 (
232276 "INET ARRAY" ,
233277 [IPv4Address ("192.0.0.1" ), IPv4Address ("192.0.0.1" )],
234278 [IPv4Address ("192.0.0.1" ), IPv4Address ("192.0.0.1" )],
235279 ),
280+ (
281+ "INET ARRAY" ,
282+ [[IPv4Address ("192.0.0.1" )], [IPv4Address ("192.0.0.1" )]],
283+ [[IPv4Address ("192.0.0.1" )], [IPv4Address ("192.0.0.1" )]],
284+ ),
236285 (
237286 "JSONB ARRAY" ,
238287 [
@@ -256,6 +305,37 @@ async def test_as_class(
256305 },
257306 ],
258307 ),
308+ (
309+ "JSONB ARRAY" ,
310+ [
311+ [
312+ {
313+ "test" : ["something" , 123 , "here" ],
314+ "nested" : ["JSON" ],
315+ },
316+ ],
317+ [
318+ {
319+ "test" : ["something" , 123 , "here" ],
320+ "nested" : ["JSON" ],
321+ },
322+ ],
323+ ],
324+ [
325+ [
326+ {
327+ "test" : ["something" , 123 , "here" ],
328+ "nested" : ["JSON" ],
329+ },
330+ ],
331+ [
332+ {
333+ "test" : ["something" , 123 , "here" ],
334+ "nested" : ["JSON" ],
335+ },
336+ ],
337+ ],
338+ ),
259339 (
260340 "JSONB ARRAY" ,
261341 [
@@ -267,6 +347,17 @@ async def test_as_class(
267347 [{"array" : "json" }, {"one more" : "test" }],
268348 ],
269349 ),
350+ (
351+ "JSONB ARRAY" ,
352+ [
353+ PyJSONB ([[{"array" : "json" }], [{"one more" : "test" }]]),
354+ PyJSONB ([[{"array" : "json" }], [{"one more" : "test" }]]),
355+ ],
356+ [
357+ [[{"array" : "json" }], [{"one more" : "test" }]],
358+ [[{"array" : "json" }], [{"one more" : "test" }]],
359+ ],
360+ ),
270361 (
271362 "JSON ARRAY" ,
272363 [
0 commit comments