File size: 8,073 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": "1f97be2a540122cb872ff59500d85a35031cab5f",
"parent": "cf87226a81108fbed4f58751f1c03234cc57bcf1",
"repository_id": "R003",
"schema_version": 1,
"task_id": "TASK_S2_R003_015",
"valid_end_to_end": true,
"validation": {
"commands": [
"python -m pytest -q tests/unit/objects"
],
"elapsed_seconds": 1.4691538750194013,
"gold": [
{
"command": "python -m pytest -q tests/unit/objects",
"elapsed_seconds": 0.42784833279438317,
"returncode": 0,
"stderr": "",
"stdout": "................................................................s..s.... [ 22%]\n........................................................................ [ 44%]\n...............................................................s........ [ 66%]\n........................................................................ [ 88%]\n..................................... [100%]\n322 passed, 3 skipped in 0.26s\n",
"timed_out": false
}
],
"hidden": [
{
"command": "python -m pytest -q tests/unit/objects",
"elapsed_seconds": 0.441324207931757,
"returncode": 1,
"stderr": "",
"stdout": ".....................................FE..........................s..s... [ 21%]\n........................................................................ [ 44%]\n................................................................s....... [ 66%]\n........................................................................ [ 88%]\n...................................... [100%]\n==================================== ERRORS ====================================\n________________ ERROR at teardown of test_get_commit_sequence _________________\n\n @pytest.fixture\n def resp_get_commit_sequence():\n content = {\n \"count\": 1,\n }\n \n> with responses.RequestsMock() as rsps:\n\ntests/unit/objects/test_commits.py:87: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n/Users/mandeepsidhu/Desktop/code/pending-work-research/agent-harness/.venv/lib/python3.11/site-packages/responses/__init__.py:996: in __exit__\n self.stop(allow_assert=success)\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <responses.RequestsMock object at 0x10be8cad0>, allow_assert = True\n\n def stop(self, allow_assert: bool = True) -> None:\n if self._patcher:\n # prevent stopping unstarted patchers\n self._patcher.stop()\n \n # once patcher is stopped, clean it. This is required to create a new\n # fresh patcher on self.start()\n self._patcher = None\n \n if not self.assert_all_requests_are_fired:\n return\n \n if not allow_assert:\n return\n \n not_called = [m for m in self.registered() if m.call_count == 0]\n if not_called:\n> raise AssertionError(\n \"Not all requests have been executed {!r}\".format(\n [(match.method, match.url) for match in not_called]\n )\n )\nE AssertionError: Not all requests have been executed [('GET', 'http://localhost/api/v4/projects/1/repository/commits/6b2257ea/sequence')]\n\n/Users/mandeepsidhu/Desktop/code/pending-work-research/agent-harness/.venv/lib/python3.11/site-packages/responses/__init__.py:1233: AssertionError\n=================================== FAILURES ===================================\n___________________________ test_get_commit_sequence ___________________________\n\nproject = <Project id:1>\nresp_get_commit_sequence = <responses.RequestsMock object at 0x10be8cad0>\n\n def test_get_commit_sequence(project, resp_get_commit_sequence):\n commit = project.commits.get(\"6b2257ea\", lazy=True)\n> sequence = commit.sequence()\n\ntests/unit/objects/test_commits.py:137: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <ProjectCommit id:6b2257ea>, name = 'sequence'\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: 'ProjectCommit' object has no attribute 'sequence'\nE \nE If you tried to access object attributes returned from the server,\nE note that <class 'gitlab.v4.objects.commits.ProjectCommit'> was\nE created as a `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_commits.py::test_get_commit_sequence - Attribu...\nERROR tests/unit/objects/test_commits.py::test_get_commit_sequence - Assertio...\n1 failed, 321 passed, 3 skipped, 1 error in 0.27s\n",
"timed_out": false
}
],
"hidden_apply": {
"elapsed_seconds": 0.00935449986718595,
"returncode": 0,
"stderr": "",
"stdout": ""
},
"original": [
{
"command": "python -m pytest -q tests/unit/objects",
"elapsed_seconds": 0.5399309578351676,
"returncode": 0,
"stderr": "",
"stdout": "...............................................................s..s..... [ 22%]\n........................................................................ [ 44%]\n..............................................................s......... [ 66%]\n........................................................................ [ 88%]\n.................................... [100%]\n321 passed, 3 skipped in 0.36s\n",
"timed_out": false
}
],
"reason": null,
"source_apply": {
"elapsed_seconds": 0.008792083011940122,
"returncode": 0,
"stderr": "",
"stdout": ""
},
"valid": true
}
}
|