mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-12-19 03:42:22 -06:00
chore: reformat the codes using autoformat.sh
PiperOrigin-RevId: 762004002
This commit is contained in:
committed by
Copybara-Service
parent
a2263b1808
commit
ff8a3c9b43
@@ -10,4 +10,4 @@
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# limitations under the License.
|
||||
|
||||
@@ -137,11 +137,15 @@ def test_get_input_files_not_exists(empty_state: State):
|
||||
def test_add_input_files_new(empty_state: State):
|
||||
"""Test adding input files to an empty session state."""
|
||||
ctx = CodeExecutorContext(empty_state)
|
||||
new_files = [File(name="new.dat", content="Yg==", mime_type="application/octet-stream")]
|
||||
ctx.add_input_files(new_files)
|
||||
assert empty_state["_code_executor_input_files"] == [
|
||||
{"name": "new.dat", "content": "Yg==", "mime_type": "application/octet-stream"}
|
||||
new_files = [
|
||||
File(name="new.dat", content="Yg==", mime_type="application/octet-stream")
|
||||
]
|
||||
ctx.add_input_files(new_files)
|
||||
assert empty_state["_code_executor_input_files"] == [{
|
||||
"name": "new.dat",
|
||||
"content": "Yg==",
|
||||
"mime_type": "application/octet-stream",
|
||||
}]
|
||||
|
||||
|
||||
def test_add_input_files_append(context_with_data: CodeExecutorContext):
|
||||
@@ -239,9 +243,7 @@ def test_reset_error_count_no_error_key(empty_state: State):
|
||||
def test_update_code_execution_result_new_invocation(empty_state: State):
|
||||
"""Test updating code execution result for a new invocation."""
|
||||
ctx = CodeExecutorContext(empty_state)
|
||||
ctx.update_code_execution_result(
|
||||
"inv1", "print('hi')", "hi", ""
|
||||
)
|
||||
ctx.update_code_execution_result("inv1", "print('hi')", "hi", "")
|
||||
results = empty_state["_code_execution_results"]["inv1"]
|
||||
assert len(results) == 1
|
||||
assert results[0]["code"] == "print('hi')"
|
||||
@@ -272,4 +274,4 @@ def test_update_code_execution_result_append(
|
||||
assert len(results) == 2
|
||||
assert results[1]["code"] == "new_code"
|
||||
assert results[1]["result_stdout"] == "new_out"
|
||||
assert results[1]["result_stderr"] == "new_err"
|
||||
assert results[1]["result_stderr"] == "new_err"
|
||||
|
||||
Reference in New Issue
Block a user