File size: 8,574 Bytes
d61821a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | {
"commit": "304bdd09cd5e6526576c5ec58cb3acd7e1a783cb",
"parent": "cfa6358b4c9c44d267d8c98a53ac840fbb27d3e8",
"repository_id": "R003",
"schema_version": 1,
"task_id": "TASK_S2_R003_001",
"valid_end_to_end": true,
"validation": {
"commands": [
"python -m pytest -q tests/unit/objects"
],
"elapsed_seconds": 1.5992753328755498,
"gold": [
{
"command": "python -m pytest -q tests/unit/objects",
"elapsed_seconds": 0.44791741692461073,
"returncode": 0,
"stderr": "",
"stdout": "........................................................................ [ 19%]\ns..s.................................................................... [ 39%]\n........................................................................ [ 59%]\n........s............................................................... [ 79%]\n........................................................................ [ 99%]\n.. [100%]\n359 passed, 3 skipped in 0.27s\n",
"timed_out": false
}
],
"hidden": [
{
"command": "python -m pytest -q tests/unit/objects",
"elapsed_seconds": 0.48796916706487536,
"returncode": 1,
"stderr": "",
"stdout": " -> Any:\n if name in self.__dict__[\"_updated_attrs\"]:\n return self.__dict__[\"_updated_attrs\"][name]\n \n if name in self.__dict__[\"_attrs\"]:\n value = self.__dict__[\"_attrs\"][name]\n # If the value is a list, we copy it in the _updated_attrs dict\n # because we are not able to detect changes made on the object\n # (append, insert, pop, ...). Without forcing the attr\n # creation __setattr__ is never called, the list never ends up\n # in the _updated_attrs dict, and the update() and save()\n # method never push the new data to the server.\n # See https://github.com/python-gitlab/python-gitlab/issues/306\n #\n # note: _parent_attrs will only store simple values (int) so we\n # don't make this check in the next block.\n if isinstance(value, list):\n self.__dict__[\"_updated_attrs\"][name] = value[:]\n return self.__dict__[\"_updated_attrs\"][name]\n \n return value\n \n if name in self.__dict__[\"_parent_attrs\"]:\n return self.__dict__[\"_parent_attrs\"][name]\n \n message = f\"{type(self).__name__!r} object has no attribute {name!r}\"\n if self._created_from_list:\n message = (\n f\"{message}\\n\\n\"\n + textwrap.fill(\n f\"{self.__class__!r} was created via a list() call and \"\n f\"only a subset of the data may be present. To ensure \"\n f\"all data is present get the object using a \"\n f\"get(object.id) call. For more details, see:\"\n )\n + f\"\\n\\n{_URL_ATTRIBUTE_ERROR}\"\n )\n elif self._lazy:\n message = f\"{message}\\n\\n\" + textwrap.fill(\n f\"If you tried to access object attributes returned from the server, \"\n f\"note that {self.__class__!r} was created as a `lazy` object and was \"\n f\"not initialized with any data.\"\n )\n> raise AttributeError(message)\nE AttributeError: 'Group' object has no attribute 'approval_rules'\nE \nE If you tried to access object attributes returned from the server,\nE note that <class 'gitlab.v4.objects.groups.Group'> was created as a\nE `lazy` object and was not initialized with any data.\n\ngitlab/base.py:134: AttributeError\n______________________ test_create_group_mr_approval_rule ______________________\n\ngroup = <Group id:1>\nresp_group_approval_rules = (<responses.RequestsMock object at 0x107559fd0>, {'include_newly_created_rule': False, 'updated_first_rule': False})\n\n def test_create_group_mr_approval_rule(group, resp_group_approval_rules):\n _, list_request_options = resp_group_approval_rules\n \n # Before: existing approval rules\n> approval_rules = group.approval_rules.list()\n\ntests/unit/objects/test_group_merge_request_approvals.py:229: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <Group id:1>, name = 'approval_rules'\n\n def __getattr__(self, name: str) -> Any:\n if name in self.__dict__[\"_updated_attrs\"]:\n return self.__dict__[\"_updated_attrs\"][name]\n \n if name in self.__dict__[\"_attrs\"]:\n value = self.__dict__[\"_attrs\"][name]\n # If the value is a list, we copy it in the _updated_attrs dict\n # because we are not able to detect changes made on the object\n # (append, insert, pop, ...). Without forcing the attr\n # creation __setattr__ is never called, the list never ends up\n # in the _updated_attrs dict, and the update() and save()\n # method never push the new data to the server.\n # See https://github.com/python-gitlab/python-gitlab/issues/306\n #\n # note: _parent_attrs will only store simple values (int) so we\n # don't make this check in the next block.\n if isinstance(value, list):\n self.__dict__[\"_updated_attrs\"][name] = value[:]\n return self.__dict__[\"_updated_attrs\"][name]\n \n return value\n \n if name in self.__dict__[\"_parent_attrs\"]:\n return self.__dict__[\"_parent_attrs\"][name]\n \n message = f\"{type(self).__name__!r} object has no attribute {name!r}\"\n if self._created_from_list:\n message = (\n f\"{message}\\n\\n\"\n + textwrap.fill(\n f\"{self.__class__!r} was created via a list() call and \"\n f\"only a subset of the data may be present. To ensure \"\n f\"all data is present get the object using a \"\n f\"get(object.id) call. For more details, see:\"\n )\n + f\"\\n\\n{_URL_ATTRIBUTE_ERROR}\"\n )\n elif self._lazy:\n message = f\"{message}\\n\\n\" + textwrap.fill(\n f\"If you tried to access object attributes returned from the server, \"\n f\"note that {self.__class__!r} was created as a `lazy` object and was \"\n f\"not initialized with any data.\"\n )\n> raise AttributeError(message)\nE AttributeError: 'Group' object has no attribute 'approval_rules'\nE \nE If you tried to access object attributes returned from the server,\nE note that <class 'gitlab.v4.objects.groups.Group'> was created as a\nE `lazy` object and was not initialized with any data.\n\ngitlab/base.py:134: AttributeError\n=========================== short test summary info ============================\nFAILED tests/unit/objects/test_group_merge_request_approvals.py::test_list_group_mr_approval_rules\nFAILED tests/unit/objects/test_group_merge_request_approvals.py::test_save_group_mr_approval_rule\nFAILED tests/unit/objects/test_group_merge_request_approvals.py::test_create_group_mr_approval_rule\n3 failed, 356 passed, 3 skipped in 0.30s\n",
"timed_out": false
}
],
"hidden_apply": {
"elapsed_seconds": 0.009530042065307498,
"returncode": 0,
"stderr": "",
"stdout": ""
},
"original": [
{
"command": "python -m pytest -q tests/unit/objects",
"elapsed_seconds": 0.600170416990295,
"returncode": 0,
"stderr": "",
"stdout": ".....................................................................s.. [ 20%]\ns....................................................................... [ 40%]\n........................................................................ [ 60%]\n.....s.................................................................. [ 80%]\n....................................................................... [100%]\n356 passed, 3 skipped in 0.41s\n",
"timed_out": false
}
],
"reason": null,
"source_apply": {
"elapsed_seconds": 0.009731292026117444,
"returncode": 0,
"stderr": "",
"stdout": ""
},
"valid": true
}
}
|