Page MenuHomeSoftware Heritage

Be more careful with content generation in test_write_replay
ClosedPublic

Authored by olasd on Tue, Mar 10, 1:54 PM.

Details

Summary

When using the object_dicts() strategy, we often end up not generating any
contents; This works because the replayer.process call is within a loop,
guarded with the length of the queue.

If the queue is empty, replayer.process is never called, but the test is also
useless. So we add an assertion to that effect.

Depends on D2795.

Test Plan

updated tox tests with new asserts

Diff Detail

Repository
rDJNL Journal infrastructure
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olasd created this revision.Tue, Mar 10, 1:54 PM
ardumont accepted this revision.Tue, Mar 10, 1:55 PM
This revision is now accepted and ready to land.Tue, Mar 10, 1:55 PM
olasd updated this revision to Diff 9947.Tue, Mar 10, 2:07 PM

Bump swh.model dependency for present_contents hypothesis strategy