Rearrange tests & fix CI (#4596)

* Rearrange tests into unit/integration/challenge categories

* Fix linting + `tests.challenges` imports

* Fix obscured duplicate test in test_url_validation.py

* Move VCR conftest to tests.vcr

* Specify tests to run & their order (unit -> integration -> challenges) in CI

* Fail Docker CI when tests fail

* Fix import & linting errors in tests

* Fix `get_text_summary`

* Fix linting errors

* Clean up pytest args in CI

* Remove bogus tests from GoCodeo
This commit is contained in:
Reinier van der Leer
2023-06-06 19:48:49 +02:00
committed by GitHub
parent 8a881f70a3
commit dafbd11686
59 changed files with 150 additions and 377 deletions

View File

@@ -70,7 +70,7 @@ def kubernetes_agent(
```
## Creating your challenge
Go to `tests/integration/challenges`and create a file that is called `test_your_test_description.py` and add it to the appropriate folder. If no category exists you can create a new one.
Go to `tests/challenges`and create a file that is called `test_your_test_description.py` and add it to the appropriate folder. If no category exists you can create a new one.
Your test could look something like this
@@ -84,7 +84,7 @@ import yaml
from autogpt.commands.file_operations import read_file, write_to_file
from tests.integration.agent_utils import run_interaction_loop
from tests.integration.challenges.utils import run_multiple_times
from tests.challenges.utils import run_multiple_times
from tests.utils import requires_api_key

View File

@@ -5,7 +5,7 @@
**Command to try**:
```
pytest -s tests/integration/challenges/information_retrieval/test_information_retrieval_challenge_a.py --level=2
pytest -s tests/challenges/information_retrieval/test_information_retrieval_challenge_a.py --level=2
```
## Description

View File

@@ -5,7 +5,7 @@
**Command to try**:
```
pytest -s tests/integration/challenges/information_retrieval/test_information_retrieval_challenge_b.py
pytest -s tests/challenges/information_retrieval/test_information_retrieval_challenge_b.py
```
## Description

View File

@@ -4,7 +4,7 @@
**Command to try**:
```
pytest -s tests/integration/challenges/memory/test_memory_challenge_b.py --level=3
pytest -s tests/challenges/memory/test_memory_challenge_b.py --level=3
``
## Description
@@ -41,4 +41,3 @@ Write all the task_ids into the file output.txt. The file has not been created y
## Objective
The objective of this challenge is to test the agent's ability to follow instructions and maintain memory of the task IDs throughout the process. The agent successfully completed this challenge if it wrote the task ids in a file.

View File

@@ -4,7 +4,7 @@
**Command to try**:
```
pytest -s tests/integration/challenges/memory/test_memory_challenge_c.py --level=2
pytest -s tests/challenges/memory/test_memory_challenge_c.py --level=2
``
## Description