Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiannis128 committed Sep 5, 2024
1 parent f5d1d6b commit bd02f6a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 23 deletions.
4 changes: 2 additions & 2 deletions tests/regtest/test_base_chat_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import pytest

from langchain.llms.fake import FakeListLLM
from langchain_community.llms import FakeListLLM
from langchain.schema import BaseMessage, HumanMessage, AIMessage, SystemMessage

from esbmc_ai.ai_models import AIModel
from esbmc_ai.chat_response import ChatResponse
from esbmc_ai.base_chat_interface import BaseChatInterface
from esbmc_ai.chats.base_chat_interface import BaseChatInterface
from esbmc_ai.config import AIAgentConversation, ChatPromptSettings


Expand Down
4 changes: 2 additions & 2 deletions tests/test_base_chat_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import pytest

from langchain.llms.fake import FakeListLLM
from langchain_community.llms import FakeListLLM
from langchain.schema import AIMessage, BaseMessage, HumanMessage, SystemMessage
from esbmc_ai.ai_models import AIModel
from esbmc_ai.base_chat_interface import BaseChatInterface
from esbmc_ai.chats.base_chat_interface import BaseChatInterface
from esbmc_ai.chat_response import ChatResponse
from esbmc_ai.config import AIAgentConversation, ChatPromptSettings

Expand Down
2 changes: 1 addition & 1 deletion tests/test_latest_state_solution_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from esbmc_ai.ai_models import AIModel
from esbmc_ai.chat_response import ChatResponse
from esbmc_ai.config import AIAgentConversation, ChatPromptSettings
from esbmc_ai.latest_state_solution_generator import LatestStateSolutionGenerator
from esbmc_ai.chats.latest_state_solution_generator import LatestStateSolutionGenerator


@pytest.fixture(scope="function")
Expand Down
19 changes: 4 additions & 15 deletions tests/test_solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import pytest
from esbmc_ai.solution import Solution, SourceFile

#####################################
# Solution
#####################################


@pytest.fixture(scope="function")
def solution() -> Solution:
Expand Down Expand Up @@ -44,18 +48,3 @@ def test_apply_line_patch() -> None:
text = "\n".join(["a", "b", "c", "d", "e", "f", "g"])
answer = "\n".join(["a", "b", "c", "1", "e", "f", "g"])
assert SourceFile.apply_line_patch(text, "1", 3, 3) == answer


def test_get_patch() -> None:
raise NotImplementedError()


def test_update_content() -> None:
raise NotImplementedError()


def test_assign_verifier_output() -> None:
raise NotImplementedError()


# TODO Add more tests for solution and sourcefile
2 changes: 1 addition & 1 deletion tests/test_solution_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from esbmc_ai.ai_models import AIModel
from esbmc_ai.config import AIAgentConversation, ChatPromptSettings
from esbmc_ai.solution_generator import SolutionGenerator
from esbmc_ai.chats.solution_generator import SolutionGenerator


@pytest.fixture(scope="function")
Expand Down
4 changes: 2 additions & 2 deletions tests/test_user_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import pytest

from langchain.llms.fake import FakeListLLM
from langchain_community.llms import FakeListLLM
from langchain.schema import AIMessage, SystemMessage

from esbmc_ai.ai_models import AIModel
from esbmc_ai.chat_response import ChatResponse, FinishReason
from esbmc_ai.config import AIAgentConversation, ChatPromptSettings
from esbmc_ai.user_chat import UserChat
from esbmc_ai.chats.user_chat import UserChat


@pytest.fixture
Expand Down

0 comments on commit bd02f6a

Please sign in to comment.