mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-07 00:04:26 +01:00
other was non solution, solution is pytest-depends
This commit is contained in:
@@ -2,7 +2,6 @@ import pytest
|
||||
from agbenchmark.Challenge import Challenge
|
||||
|
||||
|
||||
@pytest.mark.run(order=1)
|
||||
@pytest.mark.basic
|
||||
class BasicChallenge(Challenge):
|
||||
pass
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
{
|
||||
"category": ["basic"],
|
||||
"task": "Write the string 'random string' before any existing text to the file called file_to_check.txt",
|
||||
"dependencies": [
|
||||
"agbenchmark/tests/basic_abilities/write_file/write_file_test.py::TestWriteFile::test_write_file"
|
||||
],
|
||||
"dependencies": ["test_write_file"],
|
||||
"ground": {
|
||||
"answer": "random string: this is how we're doing",
|
||||
"should_contain": ["random string: this is how we're doing"],
|
||||
|
||||
@@ -25,7 +25,7 @@ class TestReadFile(BasicChallenge):
|
||||
[(data.task, data.mock_func)],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.order(after=data.dependencies)
|
||||
@pytest.mark.depends(on=data.dependencies)
|
||||
def test_read_file(self, workspace):
|
||||
file = self.open_file(workspace, data.ground.files[0])
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ class TestWriteFile(BasicChallenge):
|
||||
[(data.task, data.mock_func)],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.depends(name="test_write_file")
|
||||
def test_write_file(self, workspace):
|
||||
file = self.open_file(workspace, data.ground.files[0])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user