Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.indexer.tests.test_metadata.TestMetadata::test_compute_metadata_composer
Failed

TEST RESULT

Run At
Jun 29 2022, 11:01 PM
Details
self = <swh.indexer.tests.test_metadata.TestMetadata object at 0x7f09645fc6a0> def test_compute_metadata_composer(self): raw_content = """{ "name": "symfony/polyfill-mbstring", "type": "library", "description": "Symfony polyfill for the Mbstring extension", "keywords": [ "polyfill", "shim", "compatibility", "portable", "mbstring" ], "homepage": "https://symfony.com", "license": "MIT", "authors": [ { "name": "Nicolas Grekas", "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], "require": { "php": ">=7.1" }, "provide": { "ext-mbstring": "*" }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, "files": [ "bootstrap.php" ] }, "suggest": { "ext-mbstring": "For best performance" }, "minimum-stability": "dev", "extra": { "branch-alias": { "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } } } """.encode( "utf-8" ) result = self.composer_mapping.translate(raw_content) expected = { "@context": "https://doi.org/10.5063/schema/codemeta-2.0", "type": "SoftwareSourceCode", "name": "symfony/polyfill-mbstring", "keywords": ["polyfill", "shim", "compatibility", "portable"], "description": "Symfony polyfill for the Mbstring extension", "url": "https://symfony.com", "license": "https://spdx.org/licenses/MIT", "codeRepository": "git+ https://github.com/symfony/polyfill", "author": [ { "type": "Person", "name": "Nicolas Grekas", "email": "p@tchwork.com", }, { "type": "Person", "name": "Symfony Community", }, ], "softwareRequirements": {"php": ">=7.1"}, } # What I am getting as of now. Need to debug. # { # "@context": "https://doi.org/10.5063/schema/codemeta-2.0", # "type": "SoftwareSourceCode", # "description": "Symfony polyfill for the Mbstring extension", # "name": "symfony/polyfill-mbstring", # "schema:url": "https://symfony.com" # } > assert result == expected E AssertionError: assert None == {'@context': 'https://doi.org/10.5063/schema/codemeta-2.0', 'author': [{'email': 'p@tchwork.com', 'name': 'Nicolas Grekas', 'type': 'Person'}, {'name': 'Symfony Community', 'type': 'Person'}], 'codeRepository': 'git+ https://github.com/symfony/polyfill', 'description': 'Symfony polyfill for the Mbstring extension', ...} .tox/py3/lib/python3.7/site-packages/swh/indexer/tests/test_metadata.py:709: AssertionError