Skip to content

Commit a965e48

Browse files
Update azure-kusto-data/tests/test_helpers.py
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 5c6bba5 commit a965e48

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

azure-kusto-data/tests/test_helpers.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,14 @@ def test_parse_datetime():
134134
"""Test parse_datetime function with different pandas versions and datetime formats"""
135135
from azure.kusto.data.helpers import parse_datetime
136136
# Test with pandas v2 behavior (force version 2)
137-
df_v2 = pandas.DataFrame({
138-
"date_with_ms": ["2023-12-12T01:59:59.352Z", "2023-12-12T01:54:44.123Z"],
139-
"date_without_ms": ["2023-12-12T01:59:59Z", "2023-12-12T01:54:44Z"],
140-
"mixed": ["2023-12-12T01:59:59.352Z", "2023-12-12T01:54:44Z"],
141-
})
142-
137+
df_v2 = pandas.DataFrame(
138+
{
139+
"date_with_ms": ["2023-12-12T01:59:59.352Z", "2023-12-12T01:54:44.123Z"],
140+
"date_without_ms": ["2023-12-12T01:59:59Z", "2023-12-12T01:54:44Z"],
141+
"mixed": ["2023-12-12T01:59:59.352Z", "2023-12-12T01:54:44Z"],
142+
}
143+
)
144+
143145
# Force pandas v2 behavior
144146
result_v2 = parse_datetime(df_v2, "mixed", force_version="2.0.0")
145147
assert result_v2[0] == pandas.Timestamp(year=2023, month=12, day=12, hour=1, minute=59, second=59, microsecond=352000, tz="UTC")

0 commit comments

Comments
 (0)