fruch / pytest-elk-reporter

A plugin to send pytest test results to ELK stack
MIT License
18 stars 12 forks source link

use offset-aware datetime API #35

Closed tchaikov closed 3 months ago

tchaikov commented 3 months ago

it is distracting at seeing the warning like when running test:

  /home/kefu/.local/lib/python3.12/site-packages/pytest_elk_reporter.py:281: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    timestamp=datetime.datetime.utcnow().isoformat(),

so, in this change, let's switch to the offset-aware datetime API to silence this warning.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.68%. Comparing base (15ec2ec) to head (09fa8b1).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #35 +/- ## ======================================= Coverage 92.68% 92.68% ======================================= Files 1 1 Lines 287 287 ======================================= Hits 266 266 Misses 21 21 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.