Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Feb 16 2021, 2:43 PM
Details
self = <swh.model.tests.test_cli.TestIdentify testMethod=test_auto_directory> def test_auto_directory(self): """automatic object type detection: directory""" with tempfile.TemporaryDirectory(prefix="swh.model.cli") as dirname: result = self.runner.invoke(cli.identify, [dirname]) self.assertEqual(result.exit_code, 0) > self.assertRegex(result.output, r"^swh:\d+:dir:") E AssertionError: Regex didn't match: '^swh:\\d+:dir:' not found in ' File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/bin/pytest", line 8, in <module>\n sys.exit(console_main())\n 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\n code = main()\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/config/__init__.py", line 163, in main\n config=config\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__\n return self._hookexec(self, self.get_hookimpls(), kwargs)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec\n return self._inner_hookexec(hook, methods, kwargs)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>\n firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall\n res = hook_impl.function(*args)\n 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\n return wrap_session(config, _main)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/main.py", line 269, in wrap_session\n session.exitstatus = doit(config, session) or 0\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/main.py", line 323, in _main\n config.hook.pytest_runtestloop(session=session)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__\n return self._hookexec(self, self.get_hookimpls(), kwargs)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec\n return self._inner_hookexec(hook, methods, kwargs)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>\n firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall\n res = hook_impl.function(*args)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/main.py", line 348, in pytest_runtestloop\n item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__\n return self._hookexec(self, self.get_hookimpls(), kwargs)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec\n return self._inner_hookexec(hook, methods, kwargs)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>\n firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall\n res = hook_impl.function(*args)\n 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\n runtestprotocol(item, nextitem=nextitem)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/runner.py", line 126, in runtestprotocol\n reports.append(call_and_report(item, "call", log))\n 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\n call = call_runtest_hook(item, when, **kwds)\n 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\n lambda: ihook(item=item, **kwds), when=when, reraise=reraise\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/runner.py", line 311, in from_call\n result: Optional[TResult] = func()\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/runner.py", line 255, in <lambda>\n lambda: ihook(item=item, **kwds), when=when, reraise=reraise\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__\n return self._hookexec(self, self.get_hookimpls(), kwargs)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec\n return self._inner_hookexec(hook, methods, kwargs)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>\n firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall\n res = hook_impl.function(*args)\n 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\n item.runtest()\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/_pytest/unittest.py", line 321, in runtest\n self._testcase(result=self) # type: ignore[arg-type]\n File "/usr/lib/python3.7/unittest/case.py", line 663, in __call__\n return self.run(*args, **kwds)\n File "/usr/lib/python3.7/unittest/case.py", line 615, in run\n testMethod()\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/model/tests/test_cli.py", line 123, in test_auto_directory\n result = self.runner.invoke(cli.identify, [dirname])\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/click/testing.py", line 329, in invoke\n cli.main(args=args or (), prog_name=prog_name, **extra)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/click/core.py", line 782, in main\n rv = self.invoke(ctx)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/click/core.py", line 1066, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/click/core.py", line 610, in invoke\n return callback(*args, **kwargs)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/model/cli.py", line 248, in identify\n for (obj, swhid) in results:\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/model/cli.py", line 145, in identify_object\n path, [pattern.encode() for pattern in exclude_patterns]\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/model/cli.py", line 76, in swhid_of_dir\n return swhid(DIRECTORY, object)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/model/identifiers.py", line 962, in swhid\n metadata=metadata, # type: ignore # mypy can\'t properly unify types\n File "<attrs generated init swh.model.identifiers.SWHID>", line 15, in __init__\n self.__attrs_post_init__()\n 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__\n traceback.print_stack()\nswh:1:dir:4b825dc642cb6eb9a060e54bf8d69288fbee4904\t/tmp/swh.model.clis0vuodgm\n' .tox/py3/lib/python3.7/site-packages/swh/model/tests/test_cli.py:125: AssertionError