Page MenuHomeSoftware Heritage

Move SWHID-related tests to test_swhids.py
ClosedPublic

Authored by vlorentz on Sep 23 2021, 8:01 PM.

Details

Summary

For consistency, as the classes are now in swhids.py

Depends on D6331.

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

Build is green

Patch application report for D6332 (id=23030)

Could not rebase; Attempt merge onto df73e74b40...

Updating df73e74..4968b74
Fast-forward
 swh/model/cli.py                    |  23 +-
 swh/model/from_disk.py              |  16 +-
 swh/model/git_objects.py            | 250 +++++++++-
 swh/model/hypothesis_strategies.py  |   7 +-
 swh/model/identifiers.py            | 270 ++---------
 swh/model/tests/swh_model_data.py   |   2 +-
 swh/model/tests/test_identifiers.py | 913 ++++++------------------------------
 swh/model/tests/test_model.py       | 105 +----
 swh/model/tests/test_swhids.py      | 638 +++++++++++++++++++++++++
 9 files changed, 1083 insertions(+), 1141 deletions(-)
 create mode 100644 swh/model/tests/test_swhids.py
Changes applied before test
commit 4968b74b2278a3c83e41c40bc81af6037488f045
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 23 20:01:09 2021 +0200

    Move SWHID-related tests to test_swhids.py
    
    For consistency, as the classes are now in swhids.py

commit d5fd652ca917d9eec4dcdae65bd7c11923f4c161
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 23 17:13:38 2021 +0200

    git_objects: Fix type annotations to accept the old dicts
    
    + raise warnings

commit f56becc196ed6dd4b211c97096654c4400b047ec
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 23 16:52:22 2021 +0200

    Deprecate identifiers.py
    
    1. Add a warning
    2. Move identifier/manifest documentation to git_objects.py
    3. Remove all imports of that module.
    
    Motivation:
    
    * SWHID classes were moved to swhids.py
    * manifest computation functions were moved to git_objects.py
    * Only reexports and trivial wrappers of model.py remain

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

This revision is now accepted and ready to land.Sep 24 2021, 9:26 AM