Page MenuHomeSoftware Heritage

tests: extract most of test_*_origin_visit tests in a helper function
ClosedPublic

Authored by douardda on Wed, Aug 28, 2:09 PM.

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

douardda created this revision.Wed, Aug 28, 2:09 PM
vlorentz requested changes to this revision.Wed, Aug 28, 4:49 PM
vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/journal/tests/test_replay.py
112

The docstring should explain what it does

146–148

rename visits to expected_visits and visitsout to visits or actual_visits, for consistency with other tests.

148

assert len(visitsout) == len(visits), visitsout

157

redundant

This revision now requires changes to proceed.Wed, Aug 28, 4:49 PM
douardda added inline comments.Thu, Aug 29, 10:42 AM
swh/journal/tests/test_replay.py
157

nope, vin vs vout

douardda updated this revision to Diff 6454.Thu, Aug 29, 10:44 AM

rebased + changes according to volrentz' comments

vlorentz added inline comments.Thu, Aug 29, 11:36 AM
swh/journal/tests/test_replay.py
157

Indeed. But why did you remove it, then?

douardda added inline comments.Thu, Aug 29, 1:34 PM
swh/journal/tests/test_replay.py
157

humm not sure any more. let me dig this a bit further

douardda added inline comments.Thu, Aug 29, 1:38 PM
swh/journal/tests/test_replay.py
157

oh yes I do remember, because I do not want to handle/check all the different possible ways this 'origin' has been send into kafka (str vs. int vs dict).

I believe...

vlorentz accepted this revision.Thu, Aug 29, 3:35 PM
This revision is now accepted and ready to land.Thu, Aug 29, 3:35 PM
douardda updated this revision to Diff 6468.Thu, Aug 29, 4:29 PM

fix a typo in test_replay.py

This revision was automatically updated to reflect the committed changes.