Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport streamlined NaiveDate unit tests #1500

Merged
merged 3 commits into from Mar 9, 2024

Conversation

Zomtir
Copy link
Contributor

@Zomtir Zomtir commented Mar 9, 2024

This patch set replaces tuples with an Option<NaiveDate> in some unit tests. This results in a less cluttered check function and keeps the code more in sync with the 0.5.x branch, where Result<NaiveDate, Error> will be more prevalent.

Initially suggested by @pitdicker in #1475 for checked_(add/sub)_days and extended on two more unit tests, which will likely be adapted in 0.5.x shortly.

Affected unit tests:

  • checked_add_days
  • checked_sub_days
  • test_date_subtest_date_signed_duration_since
  • test_date_addtest_date_checked_add_signed

Copy link

codecov bot commented Mar 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.80%. Comparing base (db1c8ef) to head (21abad7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1500   +/-   ##
=======================================
  Coverage   91.80%   91.80%           
=======================================
  Files          40       40           
  Lines       18329    18337    +8     
=======================================
+ Hits        16827    16835    +8     
  Misses       1502     1502           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@pitdicker pitdicker left a comment

Choose a reason for hiding this comment

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

Nice 👍

@pitdicker pitdicker merged commit c1cb936 into chronotope:main Mar 9, 2024
35 checks passed
@pitdicker pitdicker mentioned this pull request Mar 9, 2024
@Zomtir Zomtir deleted the test_naive_date branch March 12, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants