|
26 | 26 | DateType, |
27 | 27 | DecimalType, |
28 | 28 | FixedType, |
29 | | - IcebergType, |
30 | 29 | IntegerType, |
31 | 30 | ListType, |
32 | 31 | LongType, |
@@ -350,20 +349,17 @@ def test_convert_timestamp_micros_type() -> None: |
350 | 349 | assert actual == TimestampType() |
351 | 350 |
|
352 | 351 |
|
353 | | -@pytest.mark.parametrize( |
354 | | - "adjust_to_utc, expected", |
355 | | - [ |
| 352 | +def test_convert_timestamp_nanos_type() -> None: |
| 353 | + for adjust_to_utc, expected in [ |
356 | 354 | (None, TimestampNanoType()), |
357 | 355 | (False, TimestampNanoType()), |
358 | 356 | (True, TimestamptzNanoType()), |
359 | | - ], |
360 | | -) |
361 | | -def test_convert_timestamp_nanos_type(adjust_to_utc: bool | None, expected: IcebergType) -> None: |
362 | | - avro_logical_type: dict[str, Any] = {"type": "long", "logicalType": "timestamp-nanos"} |
363 | | - if adjust_to_utc is not None: |
364 | | - avro_logical_type["adjust-to-utc"] = adjust_to_utc |
365 | | - actual = AvroSchemaConversion()._convert_logical_type(avro_logical_type) |
366 | | - assert actual == expected |
| 357 | + ]: |
| 358 | + avro_logical_type: dict[str, Any] = {"type": "long", "logicalType": "timestamp-nanos"} |
| 359 | + if adjust_to_utc is not None: |
| 360 | + avro_logical_type["adjust-to-utc"] = adjust_to_utc |
| 361 | + actual = AvroSchemaConversion()._convert_logical_type(avro_logical_type) |
| 362 | + assert actual == expected, f"adjust-to-utc={adjust_to_utc}" |
367 | 363 |
|
368 | 364 |
|
369 | 365 | def test_timestamp_nanos_avro_schema_round_trip() -> None: |
|
0 commit comments