ebyhr commented on code in PR #3651:
URL: https://github.com/apache/iceberg-python/pull/3651#discussion_r3583070888
##########
tests/utils/test_datetime.py:
##########
@@ -123,6 +123,11 @@ def test_timestamp_to_nanos_unexpected_zone_offset() ->
None:
timestamp_to_nanos("2025-02-23T16:21:44.375612001-04:00")
+def test_timestamp_to_nanos_invalid_timestamp() -> None:
+ with pytest.raises(ValueError, match="Invalid timestamp without zone:
invalid"):
Review Comment:
nit: We could verify the entire message:
```py
re.escape("Invalid timestamp without zone: invalid (must be ISO-8601)")
```
Same for `test_timestamptz_to_nanos_invalid_timestamp`.
##########
tests/utils/test_datetime.py:
##########
@@ -123,6 +123,11 @@ def test_timestamp_to_nanos_unexpected_zone_offset() ->
None:
timestamp_to_nanos("2025-02-23T16:21:44.375612001-04:00")
+def test_timestamp_to_nanos_invalid_timestamp() -> None:
+ with pytest.raises(ValueError, match="Invalid timestamp without zone:
invalid"):
Review Comment:
We could verify the entire message:
```py
re.escape("Invalid timestamp without zone: invalid (must be ISO-8601)")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]