self = <swh.model.tests.test_cli.TestIdentify testMethod=test_auto_origin>
def test_auto_origin(self):
"""automatic object type detection: origin"""
result = self.runner.invoke(cli.identify, ["https://github.com/torvalds/linux"])
self.assertEqual(result.exit_code, 0)
> self.assertRegex(result.output, r"^swh:\d+:ori:")
E AssertionError: Regex didn't match: '^swh:\\d+:ori:' 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 129, in test_auto_origin\n result = self.runner.invoke(cli.identify, ["https://github.com/torvalds/linux"])\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 148, in identify_object\n swhid = swhid_of_origin(obj)\n File "/var/lib/jenkins/workspace/DMOD/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/model/cli.py", line 82, in swhid_of_origin\n return str(SWHID(object_type="origin", object_id=origin_identifier({"url": url})))\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:ori:b63a575fe3faab7692c9f38fb09d4bb45651bb0f\thttps://github.com/torvalds/linux\n'
.tox/py3/lib/python3.7/site-packages/swh/model/tests/test_cli.py:131: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Feb 16 2021, 2:43 PM