Skip to content

Conversation

nicoe
Copy link
Contributor

@nicoe nicoe commented Aug 24, 2019

When using the parsedatetime functionalities freezegun is not used to
compute the source time. If the tests are run too close to midnight it
might result in the computation of 'tomorrow' being another day then
now() + 24h (because time.localtime() will be the next day) … thus
failing test_default_due2.

Setting sourceTime when calling parsedatime will ensure the same base is
used for all tests.

When using the parsedatetime functionalities freezegun is not used to
compute the source time. If the tests are run too close to midnight it
might result in the computation of 'tomorrow' being another day then
now() + 24h (because time.localtime() will be the next day) … thus
failing test_default_due2.

Setting sourceTime when calling parsedatime will ensure the same base is
used for all tests.
@nicoe
Copy link
Contributor Author

nicoe commented Aug 24, 2019

AFAICT this should fix #320

@WhyNotHugo
Copy link
Member

I'd rather decorate affected tests, and keep non-test code as is in this case.

Do you know exactly which tests are affected by this?

@nicoe
Copy link
Contributor Author

nicoe commented Aug 26, 2019 via email

Base automatically changed from master to main March 9, 2021 18:59
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.

2 participants