cpan_loader = <swh.loader.package.cpan.loader.CpanLoader object at 0x7f6195efcfd0>
head_release_original_artifacts_metadata = b'[{"url": "https://cpan.metacpan.org/authors/id/J/JJ/JJORE/Internals-CountObjects-0.05.tar.gz", "filename": "CountObj....tar.gz", "length": 632, "checksums": {"sha256": "e0ecf6ab4873fa55ff74da22a3c4ae0ab6a1409635c9cd2d6059abbb32be3a6a"}}]'
head_release_extrinsic_metadata = b'{\n "release" : {\n "provides" : "Internals::CountObjects",\n "distribution" : "Internals-CountObjects",...a256" : "bbf65021207a7a51c8f8475bc25c4735f49d62744a75d33595e9720731b2b02f"\n },\n "took" : 2,\n "total" : 1\n}\n'
def test_cpan_loader_load_multiple_version(
cpan_loader,
head_release_original_artifacts_metadata,
head_release_extrinsic_metadata,
):
load_status = cpan_loader.load()
assert load_status["status"] == "eventful"
assert load_status["snapshot_id"] is not None
expected_snapshot_id = "848ee8d69d33481c88ab81f6794f6504190f011f"
expected_head_release = "07382fd255ec0fc293b92aeb7e68b3fe31c174f9"
assert expected_snapshot_id == load_status["snapshot_id"]
expected_snapshot = Snapshot(
id=hash_to_bytes(load_status["snapshot_id"]),
branches={
b"releases/0.01": SnapshotBranch(
target=hash_to_bytes("e73aced4cc3d56b32a328d3248b25b052f029df4"),
target_type=TargetType.RELEASE,
),
b"releases/0.05": SnapshotBranch(
target=hash_to_bytes(expected_head_release),
target_type=TargetType.RELEASE,
),
b"HEAD": SnapshotBranch(
target=b"releases/0.05",
target_type=TargetType.ALIAS,
),
},
)
storage = cpan_loader.storage
check_snapshot(expected_snapshot, storage)
stats = get_stats(storage)
assert {
"content": 2,
"directory": 4,
"origin": 1,
"origin_visit": 1,
"release": 2,
"revision": 0,
"skipped_content": 0,
"snapshot": 1,
} == stats
head_release = storage.release_get([hash_to_bytes(expected_head_release)])[0]
assert head_release == Release(
name=b"0.05",
message=b"Synthetic release for Perl source package Internals-CountObjects version 0.05\n",
target=hash_to_bytes("af3f6a43eaf4b26dbcadb1101e8d81db6d6151e0"),
target_type=ModelObjectType.DIRECTORY,
synthetic=True,
author=Person(
fullname=b"Josh Jore <jjore@cpan.org>",
name=b"Josh Jore",
email=b"jjore@cpan.org",
),
date=TimestampWithTimezone.from_iso8601("2011-06-11T05:23:31+00:00"),
id=hash_to_bytes(expected_head_release),
)
assert_last_visit_matches(
storage,
url=ORIGIN_URL,
status="full",
type="cpan",
snapshot=expected_snapshot.id,
)
release_swhid = CoreSWHID(object_type=ObjectType.RELEASE, object_id=head_release.id)
directory_swhid = ExtendedSWHID(
object_type=ExtendedObjectType.DIRECTORY, object_id=head_release.target
)
expected_metadata = [
RawExtrinsicMetadata(
target=directory_swhid,
authority=cpan_loader.get_metadata_authority(),
fetcher=MetadataFetcher(
name="swh.loader.package.cpan.loader.CpanLoader",
version=__version__,
),
discovery_date=cpan_loader.visit_date,
format="origin-artifacts-json",
metadata=head_release_original_artifacts_metadata,
origin=ORIGIN_URL,
release=release_swhid,
),
RawExtrinsicMetadata(
target=directory_swhid,
authority=cpan_loader.get_metadata_authority(),
fetcher=MetadataFetcher(
name="swh.loader.package.cpan.loader.CpanLoader",
version=__version__,
),
discovery_date=cpan_loader.visit_date,
format="cpan-module-json",
metadata=head_release_extrinsic_metadata,
origin=ORIGIN_URL,
release=release_swhid,
),
]
> assert (
cpan_loader.storage.raw_extrinsic_metadata_get(
directory_swhid,
cpan_loader.get_metadata_authority(),
).results
== expected_metadata
)
E assert [RawExtrinsicMetadata(target=ExtendedSWHID.from_string('swh:1:dir:af3f6a43eaf4b26dbcadb1101e8d81db6d6151e0'), discovery_date=datetime.datetime(2022, 10, 11, 13, 44, 18, tzinfo=datetime.timezone.utc), authority=MetadataAuthority(type=MetadataAuthorityType.FORGE, url='https://metacpan.org/', metadata=None), fetcher=MetadataFetcher(name='swh.loader.package.cpan.loader.CpanLoader', version='4.2.1.dev23+g1544a78', metadata=None), format='cpan-module-json', metadata=b'{\n "release" : {\n "provides" : "Internals::CountObjects",\n "distribution" : "Internals-CountObjects",\n "authorized" : true,\n "license" : "perl_5",\n "author" : "JJORE",\n "name" : "Internals-CountObjects-0.05",\n "first" : false,\n "resources" : {\n "bugtracker" : {\n "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Internals-CountObjects",\n "mailto" : "bug-Internals-CountObjects@rt.cpan.org"\n },\n "repository" : {\n "web" : "http://github.com/jbenjore/Internals-CountObjects",\n "url" : "git://github.com/jbenjore/Internals-CountObjects.git",\n "type" : "git"\n },\n "homepage" : "http://search.cpan.org/dist/Internals-CountObjects"\n },\n "checksum_md5" : "ee751810f504b5a463397f22634467a7",\n "version" : "0.05",\n "changes_file" : "",\n "stat" : {\n "size" : 54473,\n "mtime" : 1307769811,\n "uid" : 1009,\n "gid" : 1009,\n "mode" : 33188\n },\n "status" : "latest",\n "archive" : "Internals-CountObjects-0.05.tar.gz",\n "deprecated" : false,\n "date" : "2011-06-11T05:23:31",\n "download_url" : "https://cpan.metacpan.org/authors/id/J/JJ/JJORE/Internals-CountObjects-0.05.tar.gz",\n "metadata" : {\n "license" : [\n "perl_5"\n ],\n "release_status" : "stable",\n "generated_by" : "Dist::Zilla version 4.200000, CPAN::Meta::Converter version 2.102400, CPAN::Meta::Converter version 2.150005",\n "no_index" : {\n "directory" : [\n "t",\n "xt",\n "inc",\n "local",\n "perl5",\n "fatlib",\n "example",\n "blib",\n "examples",\n "eg"\n ]\n },\n "version" : "0.05",\n "meta-spec" : {\n "version" : "2",\n "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec"\n },\n "prereqs" : {\n "build" : {\n "requires" : {\n "ExtUtils::CBuilder" : "0"\n }\n }\n },\n "abstract" : "Report all allocated perl objects",\n "resources" : {\n "repository" : {\n "url" : "git://github.com/jbenjore/Internals-CountObjects.git",\n "web" : "http://github.com/jbenjore/Internals-CountObjects",\n "type" : "git"\n },\n "homepage" : "http://search.cpan.org/dist/Internals-CountObjects",\n "bugtracker" : {\n "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Internals-CountObjects",\n "mailto" : "bug-Internals-CountObjects@rt.cpan.org"\n }\n },\n "author" : [\n "Josh Jore <jjore@cpan.org>"\n ],\n "dynamic_config" : 0,\n "name" : "Internals-CountObjects"\n },\n "dependency" : {\n "phase" : "build",\n "relationship" : "requires",\n "version" : "0",\n "module" : "ExtUtils::CBuilder"\n },\n "tests" : {\n "pass" : 491,\n "fail" : 0,\n "unknown" : 1,\n "na" : 0\n },\n "main_module" : "Internals::CountObjects",\n "abstract" : "Report all allocated perl objects",\n "version_numified" : 0.05,\n "maturity" : "released",\n "id" : "D3RywifomVjSA3VV8eM_huWKfrk",\n "checksum_sha256" : "bbf65021207a7a51c8f8475bc25c4735f49d62744a75d33595e9720731b2b02f"\n },\n "took" : 2,\n "total" : 1\n}\n', origin='https://metacpan.org/dist/Internals-CountObjects', visit=None, snapshot=None, release=CoreSWHID.from_string('swh:1:rel:07382fd255ec0fc293b92aeb7e68b3fe31c174f9'), revision=None, path=None, directory=None, id=hash_to_bytes('0b3e58aa0588ff16121588e98863bd877be748a3')),\n RawExtrinsicMetadata(target=ExtendedSWHID.from_string('swh:1:dir:af3f6a43eaf4b26dbcadb1101e8d81db6d6151e0'), discovery_date=datetime.datetime(2022, 10, 11, 13, 44, 18, tzinfo=datetime.timezone.utc), authority=MetadataAuthority(type=MetadataAuthorityType.FORGE, url='https://metacpan.org/', metadata=None), fetcher=MetadataFetcher(name='swh.loader.package.cpan.loader.CpanLoader', version='4.2.1.dev23+g1544a78', metadata=None), format='origin-artifacts-json', metadata=b'[{"url": "https://cpan.metacpan.org/authors/id/J/JJ/JJORE/Internals-CountObjects-0.05.tar.gz", "filename": "CountObjects-0.05.tar.gz", "length": 632, "checksums": {"sha256": "e0ecf6ab4873fa55ff74da22a3c4ae0ab6a1409635c9cd2d6059abbb32be3a6a"}}]', origin='https://metacpan.org/dist/Internals-CountObjects', visit=None, snapshot=None, release=CoreSWHID.from_string('swh:1:rel:07382fd255ec0fc293b92aeb7e68b3fe31c174f9'), revision=None, path=None, directory=None, id=hash_to_bytes('14f726c86c1c2ffd84232eb4112d2e97b1e4d644'))] == [RawExtrinsicMetadata(target=ExtendedSWHID.from_string('swh:1:dir:af3f6a43eaf4b26dbcadb1101e8d81db6d6151e0'), discovery_date=datetime.datetime(2022, 10, 11, 13, 44, 18, tzinfo=datetime.timezone.utc), authority=MetadataAuthority(type=MetadataAuthorityType.FORGE, url='https://metacpan.org/', metadata=None), fetcher=MetadataFetcher(name='swh.loader.package.cpan.loader.CpanLoader', version='4.2.1.dev23+g1544a78', metadata=None), format='origin-artifacts-json', metadata=b'[{"url": "https://cpan.metacpan.org/authors/id/J/JJ/JJORE/Internals-CountObjects-0.05.tar.gz", "filename": "CountObjects-0.05.tar.gz", "length": 632, "checksums": {"sha256": "e0ecf6ab4873fa55ff74da22a3c4ae0ab6a1409635c9cd2d6059abbb32be3a6a"}}]', origin='https://metacpan.org/dist/Internals-CountObjects', visit=None, snapshot=None, release=CoreSWHID.from_string('swh:1:rel:07382fd255ec0fc293b92aeb7e68b3fe31c174f9'), revision=None, path=None, directory=None, id=hash_to_bytes('14f726c86c1c2ffd84232eb4112d2e97b1e4d644')),\n RawExtrinsicMetadata(target=ExtendedSWHID.from_string('swh:1:dir:af3f6a43eaf4b26dbcadb1101e8d81db6d6151e0'), discovery_date=datetime.datetime(2022, 10, 11, 13, 44, 18, tzinfo=datetime.timezone.utc), authority=MetadataAuthority(type=MetadataAuthorityType.FORGE, url='https://metacpan.org/', metadata=None), fetcher=MetadataFetcher(name='swh.loader.package.cpan.loader.CpanLoader', version='4.2.1.dev23+g1544a78', metadata=None), format='cpan-module-json', metadata=b'{\n "release" : {\n "provides" : "Internals::CountObjects",\n "distribution" : "Internals-CountObjects",\n "authorized" : true,\n "license" : "perl_5",\n "author" : "JJORE",\n "name" : "Internals-CountObjects-0.05",\n "first" : false,\n "resources" : {\n "bugtracker" : {\n "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Internals-CountObjects",\n "mailto" : "bug-Internals-CountObjects@rt.cpan.org"\n },\n "repository" : {\n "web" : "http://github.com/jbenjore/Internals-CountObjects",\n "url" : "git://github.com/jbenjore/Internals-CountObjects.git",\n "type" : "git"\n },\n "homepage" : "http://search.cpan.org/dist/Internals-CountObjects"\n },\n "checksum_md5" : "ee751810f504b5a463397f22634467a7",\n "version" : "0.05",\n "changes_file" : "",\n "stat" : {\n "size" : 54473,\n "mtime" : 1307769811,\n "uid" : 1009,\n "gid" : 1009,\n "mode" : 33188\n },\n "status" : "latest",\n "archive" : "Internals-CountObjects-0.05.tar.gz",\n "deprecated" : false,\n "date" : "2011-06-11T05:23:31",\n "download_url" : "https://cpan.metacpan.org/authors/id/J/JJ/JJORE/Internals-CountObjects-0.05.tar.gz",\n "metadata" : {\n "license" : [\n "perl_5"\n ],\n "release_status" : "stable",\n "generated_by" : "Dist::Zilla version 4.200000, CPAN::Meta::Converter version 2.102400, CPAN::Meta::Converter version 2.150005",\n "no_index" : {\n "directory" : [\n "t",\n "xt",\n "inc",\n "local",\n "perl5",\n "fatlib",\n "example",\n "blib",\n "examples",\n "eg"\n ]\n },\n "version" : "0.05",\n "meta-spec" : {\n "version" : "2",\n "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec"\n },\n "prereqs" : {\n "build" : {\n "requires" : {\n "ExtUtils::CBuilder" : "0"\n }\n }\n },\n "abstract" : "Report all allocated perl objects",\n "resources" : {\n "repository" : {\n "url" : "git://github.com/jbenjore/Internals-CountObjects.git",\n "web" : "http://github.com/jbenjore/Internals-CountObjects",\n "type" : "git"\n },\n "homepage" : "http://search.cpan.org/dist/Internals-CountObjects",\n "bugtracker" : {\n "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Internals-CountObjects",\n "mailto" : "bug-Internals-CountObjects@rt.cpan.org"\n }\n },\n "author" : [\n "Josh Jore <jjore@cpan.org>"\n ],\n "dynamic_config" : 0,\n "name" : "Internals-CountObjects"\n },\n "dependency" : {\n "phase" : "build",\n "relationship" : "requires",\n "version" : "0",\n "module" : "ExtUtils::CBuilder"\n },\n "tests" : {\n "pass" : 491,\n "fail" : 0,\n "unknown" : 1,\n "na" : 0\n },\n "main_module" : "Internals::CountObjects",\n "abstract" : "Report all allocated perl objects",\n "version_numified" : 0.05,\n "maturity" : "released",\n "id" : "D3RywifomVjSA3VV8eM_huWKfrk",\n "checksum_sha256" : "bbf65021207a7a51c8f8475bc25c4735f49d62744a75d33595e9720731b2b02f"\n },\n "took" : 2,\n "total" : 1\n}\n', origin='https://metacpan.org/dist/Internals-CountObjects', visit=None, snapshot=None, release=CoreSWHID.from_string('swh:1:rel:07382fd255ec0fc293b92aeb7e68b3fe31c174f9'), revision=None, path=None, directory=None, id=hash_to_bytes('0b3e58aa0588ff16121588e98863bd877be748a3'))]
E At index 0 diff: RawExtrinsicMetadata(target=ExtendedSWHID.from_string('swh:1:dir:af3f6a43eaf4b26dbcadb1101e8d81db6d6151e0'), discovery_date=datetime.datetime(2022, 10, 11, 13, 44, 18, tzinfo=datetime.timezone.utc), authority=MetadataAuthority(type=MetadataAuthorityType.FORGE, url='https://metacpan.org/', metadata=None), fetcher=MetadataFetcher(name='swh.loader.package.cpan.loader.CpanLoader', version='4.2.1.dev23+g1544a78', metadata=None), format='cpan-module-json', metadata=b'{\n "release" : {\n "provides" : "Internals::CountObjects",\n "distribution" : "Internals-CountObjects",\n "authorized" : true,\n "license" : "perl_5",\n "author" : "JJORE",\n "name" : "Internals-CountObjects-0.05",\n "first" : false,\n "resources" : {\n "bugtracker" : {\n "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Internals-CountObjects",\n "mailto" : "bug-Internals-CountObjects@rt.cpan.org"\n },\n "repository" : {\n "web" : "http://github.com/jbenjore/Internals-CountObjects",\n "url" : "git://github.com/jbenjore/Internals-CountObjects.git",\n "type" : "git"\n },\n "homepage" : "http://search.cpan.org/dist/Internals-CountObjects"\n },\n "checksum_md5" : "ee751810f504b5a463397f22634467a7",\n "version" : "0.05",\n "changes_file" : "",\n "stat" : {\n "size" : 54473,\n "mtime" : 1307769811,\n "uid" : 1009,\n "gid" : 1009,\n "mode" : 33188\n },\n "status" : "latest",\n "archive" : "Internals-CountObjects-0.05.tar.gz",\n "deprecated" : false,\n "date" : "2011-06-11T05:23:31",\n "download_url" : "https://cpan.metacpan.org/authors/id/J/JJ/JJORE/Internals-CountObjects-0.05.tar.gz",\n "metadata" : {\n "license" : [\n "perl_5"\n ],\n "release_status" : "stable",\n "generated_by" : "Dist::Zilla version 4.200000, CPAN::Meta::Converter version 2.102400, CPAN::Meta::Converter version 2.150005",\n "no_index" : {\n "directory" : [\n "t",\n "xt",\n "inc",\n "local",\n "perl5",\n "fatlib",\n "example",\n "blib",\n "examples",\n "eg"\n ]\n },\n "version" : "0.05",\n "meta-spec" : {\n "version" : "2",\n "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec"\n },\n "prereqs" : {\n "build" : {\n "requires" : {\n "ExtUtils::CBuilder" : "0"\n }\n }\n },\n "abstract" : "Report all allocated perl objects",\n "resources" : {\n "repository" : {\n "url" : "git://github.com/jbenjore/Internals-CountObjects.git",\n "web" : "http://github.com/jbenjore/Internals-CountObjects",\n "type" : "git"\n },\n "homepage" : "http://search.cpan.org/dist/Internals-CountObjects",\n "bugtracker" : {\n "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Internals-CountObjects",\n "mailto" : "bug-Internals-CountObjects@rt.cpan.org"\n }\n },\n "author" : [\n "Josh Jore <jjore@cpan.org>"\n ],\n "dynamic_config" : 0,\n "name" : "Internals-CountObjects"\n },\n "dependency" : {\n "phase" : "build",\n "relationship" : "requires",\n "version" : "0",\n "module" : "ExtUtils::CBuilder"\n },\n "tests" : {\n "pass" : 491,\n "fail" : 0,\n "unknown" : 1,\n "na" : 0\n },\n "main_module" : "Internals::CountObjects",\n "abstract" : "Report all allocated perl objects",\n "version_numified" : 0.05,\n "maturity" : "released",\n "id" : "D3RywifomVjSA3VV8eM_huWKfrk",\n "checksum_sha256" : "bbf65021207a7a51c8f8475bc25c4735f49d62744a75d33595e9720731b2b02f"\n },\n "took" : 2,\n "total" : 1\n}\n', origin='https://metacpan.org/dist/Internals-CountObjects', visit=None, snapshot=None, release=CoreSWHID.from_string('swh:1:rel:07382fd255ec0fc293b92aeb7e68b3fe31c174f9'), revision=None, path=None, directory=None, id=hash_to_bytes('0b3e58aa0588ff16121588e98863bd877be748a3')) != RawExtrinsicMetadata(target=ExtendedSWHID.from_string('swh:1:dir:af3f6a43eaf4b26dbcadb1101e8d81db6d6151e0'), discovery_date=datetime.datetime(2022, 10, 11, 13, 44, 18, tzinfo=datetime.timezone.utc), authority=MetadataAuthority(type=MetadataAuthorityType.FORGE, url='https://metacpan.org/', metadata=None), fetcher=MetadataFetcher(name='swh.loader.package.cpan.loader.CpanLoader', version='4.2.1.dev23+g1544a78', metadata=None), format='origin-artifacts-json', metadata=b'[{"url": "https://cpan.metacpan.org/authors/id/J/JJ/JJORE/Internals-CountObjects-0.05.tar.gz", "filename": "CountObjects-0.05.tar.gz", "length": 632, "checksums": {"sha256": "e0ecf6ab4873fa55ff74da22a3c4ae0ab6a1409635c9cd2d6059abbb32be3a6a"}}]', origin='https://metacpan.org/dist/Internals-CountObjects', visit=None, snapshot=None, release=CoreSWHID.from_string('swh:1:rel:07382fd255ec0fc293b92aeb7e68b3fe31c174f9'), revision=None, path=None, directory=None, id=hash_to_bytes('14f726c86c1c2ffd84232eb4112d2e97b1e4d644'))
E Full diff:
E [
E + RawExtrinsicMetadata(target=ExtendedSWHID.from_string('swh:1:dir:af3f6a43eaf4b26dbcadb1101e8d81db6d6151e0'), discovery_date=datetime.datetime(2022, 10, 11, 13, 44, 18, tzinfo=datetime.timezone.utc), authority=MetadataAuthority(type=MetadataAuthorityType.FORGE, url='https://metacpan.org/', metadata=None), fetcher=MetadataFetcher(name='swh.loader.package.cpan.loader.CpanLoader', version='4.2.1.dev23+g1544a78', metadata=None), format='cpan-module-json', metadata=b'{\n "release" : {\n "provides" : "Internals::CountObjects",\n "distribution" : "Internals-CountObjects",\n "authorized" : true,\n "license" : "perl_5",\n "author" : "JJORE",\n "name" : "Internals-CountObjects-0.05",\n "first" : false,\n "resources" : {\n "bugtracker" : {\n "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Internals-CountObjects",\n "mailto" : "bug-Internals-CountObjects@rt.cpan.org"\n },\n "repository" : {\n "web" : "http://github.com/jbenjore/Internals-CountObjects",\n "url" : "git://github.com/jbenjore/Internals-CountObjects.git",\n "type" : "git"\n },\n "homepage" : "http://search.cpan.org/dist/Internals-CountObjects"\n },\n "checksum_md5" : "ee751810f504b5a463397f22634467a7",\n "version" : "0.05",\n "changes_file" : "",\n "stat" : {\n "size" : 54473,\n "mtime" : 1307769811,\n "uid" : 1009,\n "gid" : 1009,\n "mode" : 33188\n },\n "status" : "latest",\n "archive" : "Internals-CountObjects-0.05.tar.gz",\n "deprecated" : false,\n "date" : "2011-06-11T05:23:31",\n "download_url" : "https://cpan.metacpan.org/authors/id/J/JJ/JJORE/Internals-CountObjects-0.05.tar.gz",\n "metadata" : {\n "license" : [\n "perl_5"\n ],\n "release_status" : "stable",\n "generated_by" : "Dist::Zilla version 4.200000, CPAN::Meta::Converter version 2.102400, CPAN::Meta::Converter version 2.150005",\n "no_index" : {\n "directory" : [\n "t",\n "xt",\n "inc",\n "local",\n "perl5",\n "fatlib",\n "example",\n "blib",\n "examples",\n "eg"\n ]\n },\n "version" : "0.05",\n "meta-spec" : {\n "version" : "2",\n "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec"\n },\n "prereqs" : {\n "build" : {\n "requires" : {\n "ExtUtils::CBuilder" : "0"\n }\n }\n },\n "abstract" : "Report all allocated perl objects",\n "resources" : {\n "repository" : {\n "url" : "git://github.com/jbenjore/Internals-CountObjects.git",\n "web" : "http://github.com/jbenjore/Internals-CountObjects",\n "type" : "git"\n },\n "homepage" : "http://search.cpan.org/dist/Internals-CountObjects",\n "bugtracker" : {\n "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Internals-CountObjects",\n "mailto" : "bug-Internals-CountObjects@rt.cpan.org"\n }\n },\n "author" : [\n "Josh Jore <jjore@cpan.org>"\n ],\n "dynamic_config" : 0,\n "name" : "Internals-CountObjects"\n },\n "dependency" : {\n "phase" : "build",\n "relationship" : "requires",\n "version" : "0",\n "module" : "ExtUtils::CBuilder"\n },\n "tests" : {\n "pass" : 491,\n "fail" : 0,\n "unknown" : 1,\n "na" : 0\n },\n "main_module" : "Internals::CountObjects",\n "abstract" : "Report all allocated perl objects",\n "version_numified" : 0.05,\n "maturity" : "released",\n "id" : "D3RywifomVjSA3VV8eM_huWKfrk",\n "checksum_sha256" : "bbf65021207a7a51c8f8475bc25c4735f49d62744a75d33595e9720731b2b02f"\n },\n "took" : 2,\n "total" : 1\n}\n', origin='https://metacpan.org/dist/Internals-CountObjects', visit=None, snapshot=None, release=CoreSWHID.from_string('swh:1:rel:07382fd255ec0fc293b92aeb7e68b3fe31c174f9'), revision=None, path=None, directory=None, id=hash_to_bytes('0b3e58aa0588ff16121588e98863bd877be748a3')),
E RawExtrinsicMetadata(target=ExtendedSWHID.from_string('swh:1:dir:af3f6a43eaf4b26dbcadb1101e8d81db6d6151e0'), discovery_date=datetime.datetime(2022, 10, 11, 13, 44, 18, tzinfo=datetime.timezone.utc), authority=MetadataAuthority(type=MetadataAuthorityType.FORGE, url='https://metacpan.org/', metadata=None), fetcher=MetadataFetcher(name='swh.loader.package.cpan.loader.CpanLoader', version='4.2.1.dev23+g1544a78', metadata=None), format='origin-artifacts-json', metadata=b'[{"url": "https://cpan.metacpan.org/authors/id/J/JJ/JJORE/Internals-CountObjects-0.05.tar.gz", "filename": "CountObjects-0.05.tar.gz", "length": 632, "checksums": {"sha256": "e0ecf6ab4873fa55ff74da22a3c4ae0ab6a1409635c9cd2d6059abbb32be3a6a"}}]', origin='https://metacpan.org/dist/Internals-CountObjects', visit=None, snapshot=None, release=CoreSWHID.from_string('swh:1:rel:07382fd255ec0fc293b92aeb7e68b3fe31c174f9'), revision=None, path=None, directory=None, id=hash_to_bytes('14f726c86c1c2ffd84232eb4112d2e97b1e4d644')),
E - RawExtrinsicMetadata(target=ExtendedSWHID.from_string('swh:1:dir:af3f6a43eaf4b26dbcadb1101e8d81db6d6151e0'), discovery_date=datetime.datetime(2022, 10, 11, 13, 44, 18, tzinfo=datetime.timezone.utc), authority=MetadataAuthority(type=MetadataAuthorityType.FORGE, url='https://metacpan.org/', metadata=None), fetcher=MetadataFetcher(name='swh.loader.package.cpan.loader.CpanLoader', version='4.2.1.dev23+g1544a78', metadata=None), format='cpan-module-json', metadata=b'{\n "release" : {\n "provides" : "Internals::CountObjects",\n "distribution" : "Internals-CountObjects",\n "authorized" : true,\n "license" : "perl_5",\n "author" : "JJORE",\n "name" : "Internals-CountObjects-0.05",\n "first" : false,\n "resources" : {\n "bugtracker" : {\n "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Internals-CountObjects",\n "mailto" : "bug-Internals-CountObjects@rt.cpan.org"\n },\n "repository" : {\n "web" : "http://github.com/jbenjore/Internals-CountObjects",\n "url" : "git://github.com/jbenjore/Internals-CountObjects.git",\n "type" : "git"\n },\n "homepage" : "http://search.cpan.org/dist/Internals-CountObjects"\n },\n "checksum_md5" : "ee751810f504b5a463397f22634467a7",\n "version" : "0.05",\n "changes_file" : "",\n "stat" : {\n "size" : 54473,\n "mtime" : 1307769811,\n "uid" : 1009,\n "gid" : 1009,\n "mode" : 33188\n },\n "status" : "latest",\n "archive" : "Internals-CountObjects-0.05.tar.gz",\n "deprecated" : false,\n "date" : "2011-06-11T05:23:31",\n "download_url" : "https://cpan.metacpan.org/authors/id/J/JJ/JJORE/Internals-CountObjects-0.05.tar.gz",\n "metadata" : {\n "license" : [\n "perl_5"\n ],\n "release_status" : "stable",\n "generated_by" : "Dist::Zilla version 4.200000, CPAN::Meta::Converter version 2.102400, CPAN::Meta::Converter version 2.150005",\n "no_index" : {\n "directory" : [\n "t",\n "xt",\n "inc",\n "local",\n "perl5",\n "fatlib",\n "example",\n "blib",\n "examples",\n "eg"\n ]\n },\n "version" : "0.05",\n "meta-spec" : {\n "version" : "2",\n "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec"\n },\n "prereqs" : {\n "build" : {\n "requires" : {\n "ExtUtils::CBuilder" : "0"\n }\n }\n },\n "abstract" : "Report all allocated perl objects",\n "resources" : {\n "repository" : {\n "url" : "git://github.com/jbenjore/Internals-CountObjects.git",\n "web" : "http://github.com/jbenjore/Internals-CountObjects",\n "type" : "git"\n },\n "homepage" : "http://search.cpan.org/dist/Internals-CountObjects",\n "bugtracker" : {\n "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Internals-CountObjects",\n "mailto" : "bug-Internals-CountObjects@rt.cpan.org"\n }\n },\n "author" : [\n "Josh Jore <jjore@cpan.org>"\n ],\n "dynamic_config" : 0,\n "name" : "Internals-CountObjects"\n },\n "dependency" : {\n "phase" : "build",\n "relationship" : "requires",\n "version" : "0",\n "module" : "ExtUtils::CBuilder"\n },\n "tests" : {\n "pass" : 491,\n "fail" : 0,\n "unknown" : 1,\n "na" : 0\n },\n "main_module" : "Internals::CountObjects",\n "abstract" : "Report all allocated perl objects",\n "version_numified" : 0.05,\n "maturity" : "released",\n "id" : "D3RywifomVjSA3VV8eM_huWKfrk",\n "checksum_sha256" : "bbf65021207a7a51c8f8475bc25c4735f49d62744a75d33595e9720731b2b02f"\n },\n "took" : 2,\n "total" : 1\n}\n', origin='https://metacpan.org/dist/Internals-CountObjects', visit=None, snapshot=None, release=CoreSWHID.from_string('swh:1:rel:07382fd255ec0fc293b92aeb7e68b3fe31c174f9'), revision=None, path=None, directory=None, id=hash_to_bytes('0b3e58aa0588ff16121588e98863bd877be748a3')),
E ]
.tox/py3/lib/python3.7/site-packages/swh/loader/package/cpan/tests/test_cpan.py:216: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Oct 11 2022, 3:45 PM