Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.model.tests.test_cli.TestIdentify::test_show_filename
Failed

TEST RESULT

Run At
Feb 16 2021, 2:43 PM
Details
self = <swh.model.tests.test_cli.TestIdentify testMethod=test_show_filename> def test_show_filename(self): """filename is shown by default""" self.make_contents(self.tmpdir_name) for filename, content in self.contents.items(): path = os.path.join(self.tmpdir_name, filename) result = self.runner.invoke(cli.identify, ["--type", "content", path]) self.assertEqual(result.exit_code, 0) self.assertEqual( result.output.rstrip(), > "swh:1:cnt:%s\t%s" % (hash_to_hex(content["sha1_git"]), path.decode()), ) E AssertionError: ' File "/var/lib/jenkins/workspace/DMOD/t[7991 chars]file' != 'swh:1:cnt:d81cc0710eb6cf9efd5b920a8453e1e[44 chars]file' E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/bin/pytest", line 8, in <module> E - sys.exit(console_main()) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/config/__init__.py", line 185, in console_main E - code = main() E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/config/__init__.py", line 163, in main E - config=config E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__ E - return self._hookexec(self, self.get_hookimpls(), kwargs) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec E - return self._inner_hookexec(hook, methods, kwargs) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda> E - firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall E - res = hook_impl.function(*args) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main E - return wrap_session(config, _main) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/main.py", line 269, in wrap_session E - session.exitstatus = doit(config, session) or 0 E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/main.py", line 323, in _main E - config.hook.pytest_runtestloop(session=session) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__ E - return self._hookexec(self, self.get_hookimpls(), kwargs) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec E - return self._inner_hookexec(hook, methods, kwargs) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda> E - firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall E - res = hook_impl.function(*args) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/main.py", line 348, in pytest_runtestloop E - item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__ E - return self._hookexec(self, self.get_hookimpls(), kwargs) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec E - return self._inner_hookexec(hook, methods, kwargs) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda> E - firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall E - res = hook_impl.function(*args) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/runner.py", line 109, in pytest_runtest_protocol E - runtestprotocol(item, nextitem=nextitem) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/runner.py", line 126, in runtestprotocol E - reports.append(call_and_report(item, "call", log)) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/runner.py", line 215, in call_and_report E - call = call_runtest_hook(item, when, **kwds) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/runner.py", line 255, in call_runtest_hook E - lambda: ihook(item=item, **kwds), when=when, reraise=reraise E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/runner.py", line 311, in from_call E - result: Optional[TResult] = func() E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/runner.py", line 255, in <lambda> E - lambda: ihook(item=item, **kwds), when=when, reraise=reraise E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__ E - return self._hookexec(self, self.get_hookimpls(), kwargs) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec E - return self._inner_hookexec(hook, methods, kwargs) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda> E - firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall E - res = hook_impl.function(*args) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/runner.py", line 162, in pytest_runtest_call E - item.runtest() E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/unittest.py", line 321, in runtest E - self._testcase(result=self) # type: ignore[arg-type] E - File "/usr/lib/python3.7/unittest/case.py", line 663, in __call__ E - return self.run(*args, **kwds) E - File "/usr/lib/python3.7/unittest/case.py", line 615, in run E - testMethod() E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/model/tests/test_cli.py", line 95, in test_show_filename E - result = self.runner.invoke(cli.identify, ["--type", "content", path]) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/click/testing.py", line 329, in invoke E - cli.main(args=args or (), prog_name=prog_name, **extra) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/click/core.py", line 782, in main E - rv = self.invoke(ctx) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/click/core.py", line 1066, in invoke E - return ctx.invoke(self.callback, **ctx.params) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/click/core.py", line 610, in invoke E - return callback(*args, **kwargs) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/model/cli.py", line 248, in identify E - for (obj, swhid) in results: E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/model/cli.py", line 142, in identify_object E - swhid = swhid_of_file(path) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/model/cli.py", line 50, in swhid_of_file E - return swhid(CONTENT, object) E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/model/identifiers.py", line 962, in swhid E - metadata=metadata, # type: ignore # mypy can't properly unify types E - File "<attrs generated init swh.model.identifiers.SWHID>", line 15, in __init__ E - self.__attrs_post_init__() E - File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/model/identifiers.py", line 869, in __attrs_post_init__ E - traceback.print_stack() E swh:1:cnt:d81cc0710eb6cf9efd5b920a8453e1e07157b6cd /tmp/swh.model.from_disk1ppa_zf5/file .tox/py3/lib/python3.7/site-packages/swh/model/tests/test_cli.py:100: AssertionError