Skip to content

Commit 745bf1c

Browse files
Fix datetime.utcnow() deprecation: use datetime.now(timezone.utc) instead
Co-Authored-By: Yosef Arbiv <yosef.arbiv@gmail.com>
1 parent 80380a8 commit 745bf1c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

integration_tests/tests/test_all_columns_anomalies.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from datetime import datetime, timedelta
1+
from datetime import datetime, timedelta, timezone
22
from typing import Any, Dict, List
33

44
import pytest
@@ -169,7 +169,7 @@ def test_exclude_detection_from_training_all_columns(
169169
- Without exclusion: anomaly gets included in training baseline, test passes (misses anomaly)
170170
- With exclusion: anomaly excluded from training, test fails (detects anomaly)
171171
"""
172-
utc_now = datetime.utcnow()
172+
utc_now = datetime.now(timezone.utc)
173173

174174
# Generate 30 days of normal data with variance in null_count (8, 10, 12 pattern)
175175
normal_pattern = [8, 10, 12]

0 commit comments

Comments
 (0)