Get rid of get file path by using the data.json convention to store the challenge information (#67)

Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
This commit is contained in:
merwanehamadi
2023-07-07 13:58:17 -07:00
committed by GitHub
parent 6ef32a9b1f
commit e61523e59e
24 changed files with 4 additions and 67 deletions

View File

@@ -1,4 +1,3 @@
import os
from typing import Any, Dict
import pytest
@@ -9,9 +8,6 @@ from agbenchmark.tests.basic_abilities.basic_challenge import BasicChallenge
class TestReadFile(BasicChallenge):
"""Testing if LLM can read a file"""
def get_file_path(self) -> str: # all tests must implement this method
return os.path.join(os.path.dirname(__file__), "r_file_data.json")
@pytest.mark.depends(on=["basic_write_file"], name="basic_read_file")
def test_method(self, config: Dict[str, Any]) -> None:
self.setup_challenge(config)

View File

@@ -1,4 +1,3 @@
import os
from typing import Any, Dict
import pytest
@@ -9,9 +8,6 @@ from agbenchmark.tests.basic_abilities.basic_challenge import BasicChallenge
class TestWriteFile(BasicChallenge):
"""Testing if LLM can write to a file"""
def get_file_path(self) -> str: # all tests must implement this method
return os.path.join(os.path.dirname(__file__), "w_file_data.json")
@pytest.mark.depends(name="basic_write_file")
def test_method(self, config: Dict[str, Any]) -> None:
self.setup_challenge(config)