mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-20 15:38:09 +02:00
user commom.awrite in Editr.create_file
This commit is contained in:
parent
58907d0dbb
commit
b7ef5d6718
2 changed files with 6 additions and 7 deletions
|
|
@ -270,9 +270,10 @@ def test_create_file_unexist_path():
|
|||
editor.create_file("/unexist/path/a.txt")
|
||||
|
||||
|
||||
def test_create_file(temp_file_path):
|
||||
@pytest.mark.asyncio
|
||||
async def test_create_file(temp_file_path):
|
||||
editor = Editor()
|
||||
result = editor.create_file(str(temp_file_path))
|
||||
result = await editor.create_file(str(temp_file_path))
|
||||
|
||||
expected = f"[File {temp_file_path} created.]"
|
||||
assert result.split("\n") == expected.split("\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue