Page MenuHomeSoftware Heritage

indexer: Simplify the init step for the last tests
ClosedPublic

Authored by ardumont on Thu, Nov 29, 5:42 PM.

Details

Summary
  • tests: Simplify init step

This is probably either in conflict with D740 or need to be rebased
after it.

fossology_license: Fix docstring

Test Plan

tox

Diff Detail

Repository
rDCIDX Object indexer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.Thu, Nov 29, 5:42 PM
vlorentz requested changes to this revision.Thu, Nov 29, 5:45 PM
vlorentz added inline comments.
swh/indexer/tests/test_origin_metadata.py
159–164 ↗(On Diff #2321)

^^

swh/indexer/tests/test_utils.py
362–368 ↗(On Diff #2321)

No, that should raise an error.

This revision now requires changes to proceed.Thu, Nov 29, 5:45 PM
ardumont edited the summary of this revision. (Show Details)Thu, Nov 29, 5:50 PM
ardumont updated this revision to Diff 2322.Thu, Nov 29, 5:55 PM
ardumont marked 2 inline comments as done.

Remove spurious noise

ardumont added inline comments.Thu, Nov 29, 5:57 PM
swh/indexer/tests/test_origin_metadata.py
51 ↗(On Diff #2321)

but no! that was a tryout.

swh/indexer/tests/test_utils.py
362–368 ↗(On Diff #2321)

In that case, the tests simply won't work.
the tool_id does not exist.

That's a test initialization issue.
the tool_id somehow is a one from the memory storage. I don't get from where that comes from since it's supposed to be mock storage all around.

All this class should go away as that's not tractable in the current state.
So i'm for this ugly hack in the mean time (which will get trashed pretty soon).

vlorentz updated this revision to Diff 2324.Thu, Nov 29, 6:05 PM
  • Remove hack
vlorentz added inline comments.Fri, Nov 30, 10:21 AM
swh/indexer/tests/test_origin_metadata.py
51 ↗(On Diff #2321)

?

ardumont marked an inline comment as done.Fri, Nov 30, 10:24 AM
ardumont added inline comments.
swh/indexer/tests/test_origin_metadata.py
51 ↗(On Diff #2321)

revision_metadata_indexer = RevisionMetadataTestIndexer()

which has come back and needs to go.
I'll update the diff again.

vlorentz added inline comments.Fri, Nov 30, 10:25 AM
swh/indexer/tests/test_origin_metadata.py
51 ↗(On Diff #2321)

sorry :/

ardumont updated this revision to Diff 2339.Fri, Nov 30, 10:50 AM

Get back the diff to its feet

The diff got changed by error and i no longer see the right state
there.

ardumont marked an inline comment as done.Fri, Nov 30, 10:51 AM
ardumont added inline comments.
swh/indexer/tests/test_origin_metadata.py
51 ↗(On Diff #2321)

life happens, don't worry ;)

vlorentz accepted this revision.Fri, Nov 30, 10:51 AM
This revision is now accepted and ready to land.Fri, Nov 30, 10:51 AM
This revision was automatically updated to reflect the committed changes.