Page MenuHomeSoftware Heritage

test/model: do not test direct instanciation of model objects
ClosedPublic

Authored by douardda on Mar 11 2020, 5:55 PM.

Details

Summary

this does not work in the general case since there is no (recursive)
convertion of objects used as model object initialization.

We can only check when using the from_dict() factory.

Depends on D2816.

Diff Detail

Repository
rDMOD Data model
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

douardda created this revision.Mar 11 2020, 5:55 PM
ardumont requested changes to this revision.Mar 11 2020, 7:56 PM
ardumont added a subscriber: ardumont.

Request changes for the sake of the discussion below.

We can only check when using the from_dict() factory.

Oh, right, nice catch.

Question is, don't we want this to work recursively from the constructor?

This revision now requires changes to proceed.Mar 11 2020, 7:56 PM
ardumont accepted this revision.Mar 12 2020, 2:15 PM

Question is, don't we want this to work recursively from the constructor?

oh well, we can have that question later, i think.

This revision is now accepted and ready to land.Mar 12 2020, 2:15 PM