Skip to content

Commit 7f7d1e3

Browse files
[exec] Clean up apply-patch tests (#2648)
## Summary These tests were getting a bit unwieldy, and they're starting to become load-bearing. Let's clean them up, and get them working solidly so we can easily expand this harness with new tests. ## Test Plan - [x] Tests continue to pass
1 parent 568d6f8 commit 7f7d1e3

9 files changed

+238
-275
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class BaseClass:
2+
def method():
3+
4+
return True
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[
2+
{
3+
"type": "response.output_item.done",
4+
"item": {
5+
"type": "custom_tool_call",
6+
"name": "apply_patch",
7+
"input": "*** Begin Patch\n*** Add File: test.md\n+Hello world\n*** End Patch",
8+
"call_id": "__ID__"
9+
}
10+
},
11+
{
12+
"type": "response.completed",
13+
"response": {
14+
"id": "__ID__",
15+
"usage": {
16+
"input_tokens": 0,
17+
"input_tokens_details": null,
18+
"output_tokens": 0,
19+
"output_tokens_details": null,
20+
"total_tokens": 0
21+
},
22+
"output": []
23+
}
24+
}
25+
]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[
2+
{
3+
"type": "response.output_item.done",
4+
"item": {
5+
"type": "custom_tool_call",
6+
"name": "apply_patch",
7+
"input": "*** Begin Patch\n*** Add File: app.py\n+class BaseClass:\n+ def method():\n+ return False\n*** End Patch",
8+
"call_id": "__ID__"
9+
}
10+
},
11+
{
12+
"type": "response.completed",
13+
"response": {
14+
"id": "__ID__",
15+
"usage": {
16+
"input_tokens": 0,
17+
"input_tokens_details": null,
18+
"output_tokens": 0,
19+
"output_tokens_details": null,
20+
"total_tokens": 0
21+
},
22+
"output": []
23+
}
24+
}
25+
]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[
2+
{
3+
"type": "response.output_item.done",
4+
"item": {
5+
"type": "custom_tool_call",
6+
"name": "apply_patch",
7+
"input": "*** Begin Patch\n*** Update File: app.py\n@@ def method():\n- return False\n+\n+ return True\n*** End Patch",
8+
"call_id": "__ID__"
9+
}
10+
},
11+
{
12+
"type": "response.completed",
13+
"response": {
14+
"id": "__ID__",
15+
"usage": {
16+
"input_tokens": 0,
17+
"input_tokens_details": null,
18+
"output_tokens": 0,
19+
"output_tokens_details": null,
20+
"total_tokens": 0
21+
},
22+
"output": []
23+
}
24+
}
25+
]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[
2+
{
3+
"type": "response.output_item.done",
4+
"item": {
5+
"type": "function_call",
6+
"name": "apply_patch",
7+
"arguments": "{\n \"input\": \"*** Begin Patch\\n*** Update File: test.md\\n@@\\n-Hello world\\n+Final text\\n*** End Patch\"\n}",
8+
"call_id": "__ID__"
9+
}
10+
},
11+
{
12+
"type": "response.completed",
13+
"response": {
14+
"id": "__ID__",
15+
"usage": {
16+
"input_tokens": 0,
17+
"input_tokens_details": null,
18+
"output_tokens": 0,
19+
"output_tokens_details": null,
20+
"total_tokens": 0
21+
},
22+
"output": []
23+
}
24+
}
25+
]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[
2+
{
3+
"type": "response.completed",
4+
"response": {
5+
"id": "__ID__",
6+
"usage": {
7+
"input_tokens": 0,
8+
"input_tokens_details": null,
9+
"output_tokens": 0,
10+
"output_tokens_details": null,
11+
"total_tokens": 0
12+
},
13+
"output": []
14+
}
15+
}
16+
]

0 commit comments

Comments
 (0)