1- import asyncio
1+ from asyncio import run as _await
22
33from codeinterpreterapi .chains import (
44 aget_file_modifications ,
@@ -38,9 +38,9 @@ def test_remove_download_link() -> None:
3838 )
3939
4040
41- async def test_remove_download_link_async () -> None :
41+ def test_remove_download_link_async () -> None :
4242 assert (
43- await aremove_download_link (remove_download_link_example , llm = llm )
43+ _await ( aremove_download_link (remove_download_link_example , llm = llm ) )
4444 ).strip () == "I have created the plot to your dataset."
4545
4646
@@ -49,13 +49,13 @@ def test_get_file_modifications() -> None:
4949 assert get_file_modifications (code_no_mod , llm = llm ) == []
5050
5151
52- async def test_get_file_modifications_async () -> None :
53- assert await aget_file_modifications (code_with_mod , llm = llm ) == ["plot.png" ]
54- assert await aget_file_modifications (code_no_mod , llm = llm ) == []
52+ def test_get_file_modifications_async () -> None :
53+ assert _await ( aget_file_modifications (code_with_mod , llm = llm ) ) == ["plot.png" ]
54+ assert _await ( aget_file_modifications (code_no_mod , llm = llm ) ) == []
5555
5656
5757if __name__ == "__main__" :
5858 test_remove_download_link ()
59- asyncio . run ( test_remove_download_link_async () )
59+ test_remove_download_link_async ()
6060 test_get_file_modifications ()
61- asyncio . run ( test_get_file_modifications_async () )
61+ test_get_file_modifications_async ()
0 commit comments