Page MenuHomeSoftware Heritage

Make origin_visit_upsert parse date strings.
ClosedPublic

Authored by vlorentz on Jun 5 2019, 11:34 AM.

Diff Detail

Repository
rDSTO Storage manager
Branch
upsert_parse_date
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6017
Build 8267: tox-on-jenkinsJenkins
Build 8266: arc lint + arc unit

Event Timeline

douardda requested changes to this revision.Jun 5 2019, 1:48 PM
douardda added a subscriber: douardda.
douardda added inline comments.
swh/storage/tests/test_storage.py
1632

for this kind of test, I prefer to be able to read the input data litterally. Otherwise the reader need to pay way much more attention to get what self.date_visit is (what type) and pay extra attention to the presence of the str() call.

It's much easier to read as:

'date': '2019-01-15 10 15:35:27 CET'
This revision now requires changes to proceed.Jun 5 2019, 1:48 PM
swh/storage/tests/test_storage.py
1632

What if I add a comment instead?

swh/storage/tests/test_storage.py
1632

I prefer a literal string, but I would accept your diff with a comment. As you prefer.

  • rebase
  • use a literal string
This revision is now accepted and ready to land.Jun 5 2019, 2:30 PM
This revision was landed with ongoing or failed builds.Jun 5 2019, 2:31 PM
This revision was automatically updated to reflect the committed changes.