mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 06:24:20 +01:00
29 lines
725 B
Python
29 lines
725 B
Python
import pytest
|
|
from agbenchmark.challenges.define_task_types import ChallengeData
|
|
from agbenchmark.Challenge import Challenge
|
|
import os
|
|
|
|
data = ChallengeData.deserialize(
|
|
os.path.join(os.path.dirname(__file__), "w_file_data.json")
|
|
)
|
|
|
|
|
|
class TestWriteFile(Challenge):
|
|
"""Testing if LLM can write to a file"""
|
|
|
|
@pytest.mark.parametrize(
|
|
"server_response",
|
|
[(data.task, data.mock_func)],
|
|
indirect=True,
|
|
)
|
|
@pytest.mark.basic
|
|
@pytest.mark.dependency(name="write_file")
|
|
def test_retrieval(self, workspace):
|
|
file = self.open_file(workspace, data.ground.files[0])
|
|
|
|
score = self.scoring(file, data.ground)
|
|
|
|
print("You score is:", score)
|
|
|
|
assert score
|