move to pytest

This commit is contained in:
Robert Brennan
2024-04-26 17:38:52 -04:00
parent 0e2979130e
commit de8121c400
2 changed files with 15 additions and 21 deletions

View File

@@ -1,21 +0,0 @@
name: Run e2e test with dummy agent
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Set up environment
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry install --without evaluation
wget https://huggingface.co/BAAI/bge-small-en-v1.5/raw/main/1_Pooling/config.json -P /tmp/llama_index/models--BAAI--bge-small-en-v1.5/snapshots/5c38ec7c405ec4b44b94cc5a9bb96e735b38267a/1_Pooling/
- name: Run tests
run: |
poetry run python opendevin/main.py -t "do a flip" -m ollama/not-a-model -d ./workspace/ -c DummyAgent

View File

@@ -0,0 +1,15 @@
import asyncio
from agenthub.dummy_agent import DummyAgent
from opendevin.controller import AgentController
from opendevin.llm.llm import LLM
def test_actions_with_dummy_agent():
llm = LLM('not-a-real-model')
agent = DummyAgent(llm=llm)
controller = AgentController(agent=agent)
asyncio.run(controller.start('do a flip'))
# assertions are inside the DummyAgent