mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
adding dependencies on other challenges
This commit is contained in:
@@ -7,8 +7,6 @@ def basic_read_file_mock(task: str, workspace: str):
|
|||||||
This mock reads a file and returns its content.
|
This mock reads a file and returns its content.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Challenge.write_to_file(workspace, "file_to_check.txt", "this is how we're doing")
|
|
||||||
|
|
||||||
file_contents = Challenge.open_file(workspace, "file_to_check.txt")
|
file_contents = Challenge.open_file(workspace, "file_to_check.txt")
|
||||||
|
|
||||||
Challenge.write_to_file(
|
Challenge.write_to_file(
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class TestReadFile(Challenge):
|
|||||||
indirect=True,
|
indirect=True,
|
||||||
)
|
)
|
||||||
@pytest.mark.basic
|
@pytest.mark.basic
|
||||||
|
@pytest.mark.dependency(depends=["write_file"])
|
||||||
def test_retrieval(
|
def test_retrieval(
|
||||||
self, workspace
|
self, workspace
|
||||||
): # create_file simply there for the function to depend on the fixture
|
): # create_file simply there for the function to depend on the fixture
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class TestWriteFile(Challenge):
|
|||||||
indirect=True,
|
indirect=True,
|
||||||
)
|
)
|
||||||
@pytest.mark.basic
|
@pytest.mark.basic
|
||||||
|
@pytest.mark.dependency(name="write_file")
|
||||||
def test_retrieval(self, workspace):
|
def test_retrieval(self, workspace):
|
||||||
file = self.open_file(workspace, data.ground.files[0])
|
file = self.open_file(workspace, data.ground.files[0])
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
agbenchmark/tests/basic_abilities/write_file/write_file_test.py::TestWriteFile::test_retrieval[server_response0]
|
|
||||||
agbenchmark/tests/basic_abilities/read_file/read_file_test.py::TestReadFile::test_retrieval[server_response0]
|
agbenchmark/tests/basic_abilities/read_file/read_file_test.py::TestReadFile::test_retrieval[server_response0]
|
||||||
|
|||||||
15
poetry.lock
generated
15
poetry.lock
generated
@@ -595,6 +595,19 @@ tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
|
|||||||
[package.extras]
|
[package.extras]
|
||||||
testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
|
testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pytest-dependency"
|
||||||
|
version = "0.5.1"
|
||||||
|
description = "Manage dependencies of tests"
|
||||||
|
optional = false
|
||||||
|
python-versions = "*"
|
||||||
|
files = [
|
||||||
|
{file = "pytest-dependency-0.5.1.tar.gz", hash = "sha256:c2a892906192663f85030a6ab91304e508e546cddfe557d692d61ec57a1d946b"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
pytest = ">=3.6.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "requests"
|
name = "requests"
|
||||||
version = "2.31.0"
|
version = "2.31.0"
|
||||||
@@ -765,4 +778,4 @@ multidict = ">=4.0"
|
|||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = "^3.9"
|
python-versions = "^3.9"
|
||||||
content-hash = "a13e69f2bd9e511e1af92ed02b155a90dec38a9b8d983a711e1b67931b467d38"
|
content-hash = "4a1629eb643b5b68d47f6d1407942aa6d4a796c6d5a1b6a54bbc096b9d0efa2d"
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ click = "^8.1.3"
|
|||||||
requests = "^2.31.0"
|
requests = "^2.31.0"
|
||||||
openai = "^0.27.8"
|
openai = "^0.27.8"
|
||||||
pydantic = "^1.10.9"
|
pydantic = "^1.10.9"
|
||||||
|
pytest-dependency = "^0.5.1"
|
||||||
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
|||||||
Reference in New Issue
Block a user