Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Feb 23 2022, 2:36 PM
Details
self = <swh.indexer.tests.test_metadata.Metadata testMethod=test_compute_metadata_maven_invalid_encoding> def test_compute_metadata_maven_invalid_encoding(self): expected_warning = ( "WARNING:swh.indexer.metadata_dictionary.maven.MavenMapping:" "Error unidecoding XML from foo" ) raw_content = b"""<?xml version="1.0" encoding="UTF-8"?> <foo\xe5ct> </foo>""" with self.assertLogs("swh.indexer.metadata_dictionary", level="WARNING") as cm: result = MAPPINGS["MavenMapping"]("foo").translate(raw_content) > self.assertEqual(cm.output, [expected_warning]) E AssertionError: Lists differ: ['WAR[25 chars]_dictionary.maven.MavenMapping:Error parsing XML from foo'] != ['WAR[25 chars]_dictionary.maven.MavenMapping:Error unidecoding XML from foo'] E E First differing element 0: E 'WARN[23 chars]a_dictionary.maven.MavenMapping:Error parsing XML from foo' E 'WARN[23 chars]a_dictionary.maven.MavenMapping:Error unidecoding XML from foo' E E - ['WARNING:swh.indexer.metadata_dictionary.maven.MavenMapping:Error parsing XML ' E ? ^^^^ ---- E E + ['WARNING:swh.indexer.metadata_dictionary.maven.MavenMapping:Error unidecoding ' E ? ^^^^^^^^ E E - 'from foo'] E + 'XML from foo'] E ? ++++ .tox/py3/lib/python3.7/site-packages/swh/indexer/tests/test_metadata.py:715: AssertionError