- add a default value for negative_utc,
- add a validator for negative_utc (can be True iff offset is 0),
- add low-level tests for it.
Depends on D2823.
Differential D2824
model: improve a bit the TimestampWithTimezone model Authored by douardda on Mar 12 2020, 4:09 PM.
Details
Depends on D2823.
Diff Detail
Event TimelineComment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DMOD/job/tox/219/
Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DMOD/job/tox/221/ Comment Actions Build has FAILED Link to build: https://jenkins.softwareheritage.org/job/DMOD/job/tox/227/ Comment Actions Build is green Patch application report for D2824 (id=10442)Could not rebase; Attempt merge onto e9a4c7519e... Updating e9a4c75..10b0699 Fast-forward mypy.ini | 4 +- requirements.txt | 1 + swh/model/hypothesis_strategies.py | 20 ++- swh/model/model.py | 324 ++++++++++++++++++++++++++----------- swh/model/tests/test_model.py | 121 +++++++++++++- 5 files changed, 369 insertions(+), 101 deletions(-) Changes applied before testcommit 10b069921e74f0d0411fb105349471e0f9a79f29
Author: David Douard <david.douard@sdfa3.org>
Date: Thu Mar 12 16:01:55 2020 +0100
model: improve a bit the TimestampWithTimezone model
- add a validator for negative_utc (can be True iff offset is 0),
- update the timestamps_with_timezone hypothesis strategy,
- add low-level tests for it.
commit ac9d4c84a115c6c8d3aea04ed55635e8e743ea1d
Author: David Douard <david.douard@sdfa3.org>
Date: Thu Mar 12 14:27:23 2020 +0100
tests: add low level tests for the Timestamp model entity
commit 85ca7d7848008951f2e26c55c1c72ed9fa92cefb
Author: David Douard <david.douard@sdfa3.org>
Date: Fri Mar 20 12:59:56 2020 +0100
model: use attrs_static to enforce type validation of model objects
This ensures all instanciated model entities have valid types for attributes.
Related to T2308.See https://jenkins.softwareheritage.org/job/DMOD/job/tests-on-diff/20/ for more details. | ||||||||||||||||||||||