Page MenuHomeSoftware Heritage

tests: Add missing PIDs related function tests
ClosedPublic

Authored by anlambert on Apr 2 2020, 6:21 PM.

Details

Summary

Ensure all functions in swh.web.common.identifiers are covered by tests.

Related to T2342

Diff Detail

Repository
rDWAPPS Web applications
Branch
add-missing-identifiers-tests
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11594
Build 17580: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 17579: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D2950 (id=10499)

Rebasing onto 0b54881210...

Current branch diff-target is up to date.
Changes applied before test
commit bbc4486281d52e2158eab1b04f15fb4b9e59d55f
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Apr 2 18:18:10 2020 +0200

    tests: Add missing PIDs related function tests
    
    Related to T2342

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

ardumont added a subscriber: ardumont.
ardumont added inline comments.
swh/web/tests/common/test_identifiers.py
77

you can define that more simply with:

with pytest.raises(BadInputExc, match='Origin PIDs'):
    resolve_swh...
This revision is now accepted and ready to land.Apr 2 2020, 6:51 PM
swh/web/tests/common/test_identifiers.py
77

Oh nice I did not know that trick, thanks !

Update: simplify exception text matching

Build is green

Patch application report for D2950 (id=10502)

Rebasing onto 0b54881210...

Current branch diff-target is up to date.
Changes applied before test
commit f77f32dc8400d5b0323c488160740213932f50be
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Apr 2 18:18:10 2020 +0200

    tests: Add missing PIDs related function tests
    
    Related to T2342

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