naive dates being now properly forbidden.
Details
Details
- Reviewers
vlorentz - Group Reviewers
Reviewers - Commits
- rDSTOe64944bc53c9: tests: fix test_replay; do only use aware datetime objects
Diff Detail
Diff Detail
- Repository
- rDSTO Storage manager
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
Build is green
Patch application report for D3137 (id=11150)
Rebasing onto 4edf9e1454...
Current branch diff-target is up to date.
Changes applied before test
commit e64944bc53c936419dfa523424b5c171c2d1425a Author: David Douard <david.douard@sdfa3.org> Date: Mon May 11 16:15:51 2020 +0200 tests: fix test_replay; do only use aware datetime objects naive dates being now properly forbidden.
See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/165/ for more details.
Comment Actions
we usually define a now() function at the beginning of modules to return an aware datetime, but that's ok too
Comment Actions
I do prefer this to make it visible we do create an aware date object in the code (or the function should be called something more explicit).
Thx.
Comment Actions
We define one in swh.storage.utils.now [1]
Maybe that should be reworked as you discussed?
[1] https://forge.softwareheritage.org/source/swh-storage/browse/master/swh/storage/utils.py$14-15