Skip to content

Conversation

ErikKalkoken
Copy link
Contributor

@ErikKalkoken ErikKalkoken commented Jun 30, 2023

Fixes #122

Changes proposed in this pull request:

  • Add tests for naturaltime() with when parameter and timezone aware datetimes
  • Refactor logic for converting timezone aware datetimes into naive datetimes into a function

@hugovk hugovk changed the title Fix issue 122 Move logic to convert aware datetime to naive into function Jun 30, 2023
@hugovk hugovk added the changelog: Fixed For any bug fixes label Jun 30, 2023
@codecov
Copy link

codecov bot commented Jun 30, 2023

Codecov Report

Merging #123 (5262409) into main (fb3322a) will increase coverage by 0.00%.
Report is 12 commits behind head on main.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #123   +/-   ##
=======================================
  Coverage   99.18%   99.19%           
=======================================
  Files           9        9           
  Lines         737      746    +9     
=======================================
+ Hits          731      740    +9     
  Misses          6        6           
Flag Coverage Δ
macos-latest 97.58% <100.00%> (+0.02%) ⬆️
ubuntu-latest 97.58% <100.00%> (+0.02%) ⬆️
windows-latest 96.11% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/humanize/time.py 100.00% <100.00%> (ø)
tests/test_time.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, a couple of minor suggestions.

Copy link

@thedoctorjtd thedoctorjtd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revisions make sense; original changes should fix the issue.

@hugovk hugovk merged commit 7abebba into python-humanize:main Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: Fixed For any bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: can't subtract offset-naive and offset-aware datetimes

3 participants