Page MenuHomeSoftware Heritage

tests: Simplify origin comparison and improve pytest diff on failure
ClosedPublic

Authored by vlorentz on Aug 24 2022, 5:21 PM.

Details

Summary

By using a single equality instead of checking len() then zip()
to check one by one, pytest can find the common/missing elements
and print them nicely when the two lists are unequal.

Diff Detail

Repository
rDLS Listers
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D8307 (id=29990)

Rebasing onto 4b511b4181...

Current branch diff-target is up to date.
Changes applied before test
commit b7ec6cb120b4c2a5f2fb3153794a4c0f4fb97135
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Aug 24 17:21:24 2022 +0200

    tests: Simplify origin comparison and improve pytest diff on failure
    
    By using a single equality instead of checking len() then zip()
    to check one by one, pytest can find the common/missing elements
    and print them nicely when the two lists are unequal.

See https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/611/ for more details.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 25 2022, 10:01 AM
This revision was automatically updated to reflect the committed changes.