adding dependencies on other challenges

This commit is contained in:
Silen Naihin
2023-06-24 12:24:17 -04:00
parent 22458a04e8
commit 60a7ac2343
6 changed files with 17 additions and 4 deletions

View File

@@ -7,8 +7,6 @@ def basic_read_file_mock(task: str, workspace: str):
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")
Challenge.write_to_file(

View File

@@ -25,6 +25,7 @@ class TestReadFile(Challenge):
indirect=True,
)
@pytest.mark.basic
@pytest.mark.dependency(depends=["write_file"])
def test_retrieval(
self, workspace
): # create_file simply there for the function to depend on the fixture

View File

@@ -17,6 +17,7 @@ class TestWriteFile(Challenge):
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])

View File

@@ -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]

15
poetry.lock generated
View File

@@ -595,6 +595,19 @@ tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
[package.extras]
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]]
name = "requests"
version = "2.31.0"
@@ -765,4 +778,4 @@ multidict = ">=4.0"
[metadata]
lock-version = "2.0"
python-versions = "^3.9"
content-hash = "a13e69f2bd9e511e1af92ed02b155a90dec38a9b8d983a711e1b67931b467d38"
content-hash = "4a1629eb643b5b68d47f6d1407942aa6d4a796c6d5a1b6a54bbc096b9d0efa2d"

View File

@@ -14,6 +14,7 @@ click = "^8.1.3"
requests = "^2.31.0"
openai = "^0.27.8"
pydantic = "^1.10.9"
pytest-dependency = "^0.5.1"
[build-system]