Page MenuHomeSoftware Heritage

Add assertOriginMetadataOk.
ClosedPublic

Authored by vlorentz on Tue, Nov 27, 6:47 PM.

Details

Reviewers
anlambert
Group Reviewers
Reviewers
Test Plan

Has no proper test yet (T1393). I'm going to send a diff that uses it for swh.deposit.

Diff Detail

Repository
rDLDBASE Generic VCS Loader
Branch
assertOriginMetadataOk
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2819
Build 3546: tox-on-jenkinsJenkins
Build 3545: arc lint + arc unit

Event Timeline

vlorentz created this revision.Tue, Nov 27, 6:47 PM
vlorentz updated this revision to Diff 2353.Fri, Nov 30, 12:13 PM
  • feature branch
vlorentz updated this revision to Diff 2362.Fri, Nov 30, 1:24 PM
  • Make flake8 happy.
zack added a subscriber: zack.Sat, Dec 1, 3:48 PM
zack added inline comments.
swh/loader/core/tests/__init__.py
135

I realize this it not a problem introduced by this diffs, but FWIW the naming of all these assertion should be assertFooEqual, not assertFooOk, because that is what they're testing.

If would be just awesome if you could take the chance of this change to refactor that :-)

Your example, though, makes this distinction particularly relevant. Because for metadata (which are dictionaries) it would make sense to both asserts equality and to assert that the expected metadata are a subset of the obtained one, as in the future we might end up detecting more metadata, and making old tests failing only due to that might not be what we want, at least in some cases.

vlorentz updated this revision to Diff 2419.Tue, Dec 4, 4:24 PM
  • Rename method.
anlambert accepted this revision.Tue, Dec 4, 4:26 PM
This revision is now accepted and ready to land.Tue, Dec 4, 4:26 PM
vlorentz marked an inline comment as done.Wed, Dec 5, 10:03 AM
vlorentz added inline comments.
swh/loader/core/tests/__init__.py
135

Done in D772