repo_id stringclasses 409
values | prefix large_stringlengths 34 36.3k | target large_stringlengths 1 498 | assertion_type stringclasses 31
values | difficulty stringclasses 8
values | test_file stringlengths 10 121 | test_function stringlengths 1 104 | test_class stringlengths 0 51 | lineno int32 2 11.3k | commit_idx int32 |
|---|---|---|---|---|---|---|---|---|---|
datapizza-labs/datapizza-ai | from datapizza.modules.splitters.node_splitter import NodeSplitter
from datapizza.type.type import Node
def test_empy_node():
splitter = NodeSplitter(max_char=10)
node = Node()
result = splitter.run(node)
assert len(result) == | 0 | assert | numeric_literal | datapizza-ai-core/datapizza/modules/splitters/tests/test_node_splitter.py | test_empy_node | 33 | null | |
datapizza-labs/datapizza-ai | from unittest.mock import AsyncMock, MagicMock
import pytest
from ..mcp_client import MCPClient
class TestMCPClientPersistence:
def test_is_persistent_true_when_session_set(self):
"""Test is_persistent returns True when _persistent_session is set."""
client = MCPClient(url="https://example.com/m... | True | assert | bool_literal | datapizza-ai-core/datapizza/tools/tests/test_mcp_client.py | test_is_persistent_true_when_session_set | TestMCPClientPersistence | 47 | null |
datapizza-labs/datapizza-ai | from datapizza.tools.tools import Tool, tool
from datapizza.type.type import (
Block,
FunctionCallBlock,
FunctionCallResultBlock,
Media,
MediaBlock,
TextBlock,
)
def test_hash():
block = TextBlock(content="Hello, world!")
print(hash(block))
assert hash(block) == | hash(block) | assert | func_call | datapizza-ai-core/datapizza/type/tests/test_type.py | test_hash | 15 | null | |
datapizza-labs/datapizza-ai | from pathlib import Path
from datapizza.clients.mock_client import MockClient
from datapizza.core.clients.client import ClientResponse, StreamInferenceClientModule
from datapizza.core.models import PipelineComponent
from datapizza.embedders.embedders import ClientEmbedder
from datapizza.modules.rewriters import ToolRe... | {"A": a, "B": b} | assert | collection | datapizza-ai-core/datapizza/pipeline/tests/test_graph_pipeline.py | test_graph_pipeline | 44 | null | |
datapizza-labs/datapizza-ai | import os
import tempfile
import pytest
from datapizza.modules.parsers.md_parser import MDParser
from datapizza.type import NodeType
def temp_md_file():
content = """# Title
This is a paragraph.
## Section 1
This is section 1.
### Subsection 1.1
Content 1.1.
## Section 2
Content 2.
"""
with tempfile.N... | path | assert | variable | datapizza-ai-core/datapizza/modules/parsers/tests/test_md_parser.py | test_md_parser_no_headers | 114 | null | |
datapizza-labs/datapizza-ai | from typing import TypeVar
from pydantic import BaseModel
from datapizza.memory.memory import Memory
from datapizza.tools import tool
from datapizza.type import (
ROLE,
FunctionCallBlock,
FunctionCallResultBlock,
Media,
MediaBlock,
StructuredBlock,
TextBlock,
)
Model = TypeVar("Model", bo... | memory | assert | variable | datapizza-ai-core/datapizza/memory/tests/test_memory.py | test_memory_copy | 250 | null | |
datapizza-labs/datapizza-ai | import json
import os
import pytest
from datapizza.type import NodeType
from datapizza.modules.parsers.azure import AzureParser
def sample_azure_result():
with open(
os.path.join(os.path.dirname(__file__), "attention_wikipedia_test.json"),
) as f:
sample_result = json.load(f)
return sampl... | "test_value" | assert | string_literal | datapizza-ai-modules/parsers/azure/tests/test_azure_parser.py | test_parse_with_metadata | 71 | null | |
datapizza-labs/datapizza-ai | import pytest
from datapizza.memory.memory import Memory
from datapizza.type import ROLE, StructuredBlock, TextBlock
from datapizza.clients.google.memory_adapter import GoogleMemoryAdapter
def test_google_memory_to_messages_with_input_str():
memory = Memory()
input_str = "What is the weather?"
messages = ... | str(messages[-1]["parts"]) | assert | func_call | datapizza-ai-clients/datapizza-ai-clients-google/tests/test_memory_adapter.py | test_google_memory_to_messages_with_input_str | 35 | null | |
datapizza-labs/datapizza-ai | from unittest.mock import Mock
import pytest
from pydantic import BaseModel
from datapizza.core.clients import Client, ClientResponse
from datapizza.memory.memory import Memory
from datapizza.modules.metatagger.keyword_metatagger import KeywordMetatagger
from datapizza.type import Chunk, StructuredBlock
def mock_cli... | ["AI", "machine learning"] | assert | collection | datapizza-ai-core/datapizza/modules/metatagger/tests/test_keyword_metagger.py | test_process_chunk | 75 | null | |
datapizza-labs/datapizza-ai | from pathlib import Path
from datapizza.clients.mock_client import MockClient
from datapizza.core.clients.client import ClientResponse, StreamInferenceClientModule
from datapizza.core.models import PipelineComponent
from datapizza.embedders.embedders import ClientEmbedder
from datapizza.modules.rewriters import ToolRe... | "A" | assert | string_literal | datapizza-ai-core/datapizza/pipeline/tests/test_graph_pipeline.py | test_graph_pipeline | 39 | null | |
datapizza-labs/datapizza-ai | from typing import Any
from ..tools import Tool, tool
def mt_test_function():
return "test"
def decorated_function(x: int, y: str = "default") -> str:
"""Test function docstring"""
return f"{x} {y}"
def test_tool_with_function():
# Test basic Tool initialization with a function
t = Tool(func=mt_... | "test" | assert | string_literal | datapizza-ai-core/datapizza/tools/tests/test_tools.py | test_tool_with_function | 21 | null | |
datapizza-labs/datapizza-ai | from unittest.mock import Mock
import pytest
from pydantic import BaseModel
from datapizza.core.clients import Client, ClientResponse
from datapizza.memory.memory import Memory
from datapizza.modules.metatagger.keyword_metatagger import KeywordMetatagger
from datapizza.type import Chunk, StructuredBlock
def mock_cli... | "Test text" | assert | string_literal | datapizza-ai-core/datapizza/modules/metatagger/tests/test_keyword_metagger.py | test_process_chunk | 74 | null | |
datapizza-labs/datapizza-ai | import json
import os
import pytest
from datapizza.type import NodeType
from datapizza.modules.parsers.azure import AzureParser
def sample_azure_result():
with open(
os.path.join(os.path.dirname(__file__), "attention_wikipedia_test.json"),
) as f:
sample_result = json.load(f)
return sampl... | "direct_call" | assert | string_literal | datapizza-ai-modules/parsers/azure/tests/test_azure_parser.py | test_call_method_with_metadata | 135 | null | |
datapizza-labs/datapizza-ai | import contextlib
import uuid
import pytest
from datapizza.core.vectorstore import VectorConfig
from datapizza.type import (
Chunk,
EmbeddingFormat,
SparseEmbedding,
)
from datapizza.vectorstores.milvus import MilvusVectorstore
MILVUS_URI = "./milvus.db"
def unique_coll(prefix="itest"):
return f"{pr... | 7 | assert | numeric_literal | datapizza-ai-vectorstores/datapizza-ai-vectorstores-milvus/datapizza/vectorstores/milvus/tests/test_milvus_vectorstore.py | test_dump_collection_paged | 151 | null | |
datapizza-labs/datapizza-ai | import asyncio
from concurrent.futures import ThreadPoolExecutor
from datapizza.agents.agent import PLANNING_PROMT, Agent, StepResult
from datapizza.clients import MockClient
from datapizza.core.clients import ClientResponse
from datapizza.tools import tool
class TestStatelessAgents:
def test_stateless_agent_invo... | 0 | assert | numeric_literal | datapizza-ai-core/datapizza/agents/tests/test_base_agents.py | test_stateless_agent_invoke | TestStatelessAgents | 115 | null |
datapizza-labs/datapizza-ai | from pathlib import Path
from datapizza.core.models import PipelineComponent
from datapizza.pipeline import Dependency, FunctionalPipeline
TEST_DIR = Path(__file__).parent
def test_pipeline_with_then_and_dependencies():
class A(PipelineComponent):
def _run(self):
return "A"
async def... | {"start": "A", "then": "ABC", "C": "C"} | assert | collection | datapizza-ai-core/datapizza/pipeline/tests/test_functional_pipeline.py | test_pipeline_with_then_and_dependencies | 107 | null | |
datapizza-labs/datapizza-ai | import os
import tempfile
import pytest
from datapizza.modules.parsers.md_parser import MDParser
from datapizza.type import NodeType
def temp_md_file():
content = """# Title
This is a paragraph.
## Section 1
This is section 1.
### Subsection 1.1
Content 1.1.
## Section 2
Content 2.
"""
with tempfile.N... | "Sentence one." | assert | string_literal | datapizza-ai-core/datapizza/modules/parsers/tests/test_md_parser.py | test_md_parser_sentences | 133 | null | |
datapizza-labs/datapizza-ai | import threading
import time
from unittest.mock import Mock, patch
import pytest
from opentelemetry.sdk.trace import ReadableSpan
from opentelemetry.sdk.trace.export import SpanExportResult
from opentelemetry.trace import SpanContext
from datapizza.tracing.memory_exporter import (
ContextSpanProcessor,
InMemo... | 2 | assert | numeric_literal | datapizza-ai-core/datapizza/tracing/tests/test_tracing.py | test_export_multiple_spans_same_trace | TestInMemoryTraceExporter | 69 | null |
datapizza-labs/datapizza-ai | import pytest
from pydantic import BaseModel
from datapizza.clients.mock_client import MockClient
from datapizza.core.clients import Client, ClientResponse
from datapizza.memory.memory import Memory
from datapizza.type import TextBlock
from datapizza.type.type import ROLE
def test_stream_response():
llm = MockCli... | text | assert | variable | datapizza-ai-core/datapizza/core/clients/tests/test_mock_client.py | test_stream_response | 35 | null | |
datapizza-labs/datapizza-ai | import contextlib
import uuid
import pytest
from datapizza.core.vectorstore import VectorConfig
from datapizza.type import (
Chunk,
EmbeddingFormat,
SparseEmbedding,
)
from datapizza.vectorstores.milvus import MilvusVectorstore
MILVUS_URI = "./milvus.db"
def unique_coll(prefix="itest"):
return f"{pr... | cols | assert | variable | datapizza-ai-vectorstores/datapizza-ai-vectorstores-milvus/datapizza/vectorstores/milvus/tests/test_milvus_vectorstore.py | test_create_and_list_collections | 82 | null | |
datapizza-labs/datapizza-ai | from datapizza.embedders.fastembedder import FastEmbedder
def test_init_fastembedder():
embedder = FastEmbedder(model_name="Qdrant/bm25")
assert embedder is not | None | assert | none_literal | datapizza-ai-embedders/fastembedder/tests/test_fastembedder.py | test_init_fastembedder | 6 | null | |
datapizza-labs/datapizza-ai | import warnings
import pytest
from datapizza.type import Node, NodeType
from datapizza.modules.parsers.docling.docling_parser import DoclingParser
from datapizza.modules.parsers.docling.ocr_options import OCREngine, OCROptions
def test_parser_preserves_json_output_dir_with_ocr_options(tmp_path):
"""Test parser p... | str(tmp_path) | assert | func_call | datapizza-ai-modules/parsers/docling/datapizza/modules/parsers/docling/tests/test_docling_parser.py | test_parser_preserves_json_output_dir_with_ocr_options | 119 | null | |
datapizza-labs/datapizza-ai | import json
import pytest
from datapizza.memory.memory import Memory
from datapizza.tools.tools import tool
from datapizza.type.type import (
ROLE,
FunctionCallBlock,
Media,
MediaBlock,
StructuredBlock,
TextBlock,
)
from openai.types.responses import ResponseFunctionToolCall
from datapizza.cli... | str(messages[-1]["content"]) | assert | func_call | datapizza-ai-clients/datapizza-ai-clients-openai/tests/test_memory_adapter.py | test_memory_to_messages_with_input_block | 178 | null | |
datapizza-labs/datapizza-ai | from pathlib import Path
from datapizza.core.models import PipelineComponent
from datapizza.pipeline import IngestionPipeline
from datapizza.type import Chunk, DenseEmbedding, Node
TEST_DIR = Path(__file__).parent
def test_pipeline_from_yaml_backward_compatibility():
"""Test that existing YAML configs without el... | 4 | assert | numeric_literal | datapizza-ai-core/datapizza/pipeline/tests/test_pipeline.py | test_pipeline_from_yaml_backward_compatibility | 218 | null | |
datapizza-labs/datapizza-ai | import pytest
from pydantic import BaseModel
from datapizza.clients.mock_client import MockClient
from datapizza.core.clients import Client, ClientResponse
from datapizza.memory.memory import Memory
from datapizza.type import TextBlock
from datapizza.type.type import ROLE
def test_client_with_memory():
text1 = "M... | text1 + text2 | assert | complex_expr | datapizza-ai-core/datapizza/core/clients/tests/test_mock_client.py | test_client_with_memory | 85 | null | |
datapizza-labs/datapizza-ai | from datapizza.tools.tools import Tool, tool
from datapizza.type.type import (
Block,
FunctionCallBlock,
FunctionCallResultBlock,
Media,
MediaBlock,
TextBlock,
)
def test_block_new_function_call():
@tool
def test_func():
pass
block = FunctionCallBlock(id="1", arguments={}, ... | "1" | assert | string_literal | datapizza-ai-core/datapizza/type/tests/test_type.py | test_block_new_function_call | 47 | null | |
datapizza-labs/datapizza-ai | import json
import pytest
from datapizza.memory.memory import Memory
from datapizza.tools.tools import tool
from datapizza.type.type import (
ROLE,
FunctionCallBlock,
Media,
MediaBlock,
StructuredBlock,
TextBlock,
)
from openai.types.responses import ResponseFunctionToolCall
from datapizza.cli... | [] | assert | collection | datapizza-ai-clients/datapizza-ai-clients-openai/tests/test_memory_adapter.py | test_empty_memory_to_messages | 40 | null | |
datapizza-labs/datapizza-ai | import os
import tempfile
import pytest
from datapizza.modules.parsers.md_parser import MDParser
from datapizza.type import NodeType
def temp_md_file():
content = """# Title
This is a paragraph.
## Section 1
This is section 1.
### Subsection 1.1
Content 1.1.
## Section 2
Content 2.
"""
with tempfile.N... | NodeType.PARAGRAPH | assert | complex_expr | datapizza-ai-core/datapizza/modules/parsers/tests/test_md_parser.py | test_md_parser_no_headers | 116 | null | |
datapizza-labs/datapizza-ai | import json
import os
import pytest
from datapizza.type import NodeType
from datapizza.modules.parsers.azure import AzureParser
def sample_azure_result():
with open(
os.path.join(os.path.dirname(__file__), "attention_wikipedia_test.json"),
) as f:
sample_result = json.load(f)
return sampl... | NodeType.DOCUMENT | assert | complex_expr | datapizza-ai-modules/parsers/azure/tests/test_azure_parser.py | test_azure_parser_parse | 33 | null | |
datapizza-labs/datapizza-ai | import json
import os
import pytest
from datapizza.type import NodeType
from datapizza.modules.parsers.azure import AzureParser
def sample_azure_result():
with open(
os.path.join(os.path.dirname(__file__), "attention_wikipedia_test.json"),
) as f:
sample_result = json.load(f)
return sampl... | "user_upload" | assert | string_literal | datapizza-ai-modules/parsers/azure/tests/test_azure_parser.py | test_parse_with_metadata | 70 | null | |
datapizza-labs/datapizza-ai | from pathlib import Path
from datapizza.core.models import PipelineComponent
from datapizza.pipeline import Dependency, FunctionalPipeline
TEST_DIR = Path(__file__).parent
def test_pipeline_from_yaml():
from datapizza.clients.mock_client import MockClient
from datapizza.modules.rewriters import ToolRewriter
... | None | assert | none_literal | datapizza-ai-core/datapizza/pipeline/tests/test_functional_pipeline.py | test_pipeline_from_yaml | 131 | null | |
datapizza-labs/datapizza-ai | from unittest.mock import Mock
import pytest
from pydantic import BaseModel
from datapizza.core.clients import Client, ClientResponse
from datapizza.memory.memory import Memory
from datapizza.modules.metatagger.keyword_metatagger import KeywordMetatagger
from datapizza.type import Chunk, StructuredBlock
def mock_cli... | "1" | assert | string_literal | datapizza-ai-core/datapizza/modules/metatagger/tests/test_keyword_metagger.py | test_process_chunk | 73 | null | |
datapizza-labs/datapizza-ai | import warnings
import pytest
from datapizza.type import Node, NodeType
from datapizza.modules.parsers.docling.docling_parser import DoclingParser
from datapizza.modules.parsers.docling.ocr_options import OCREngine, OCROptions
def test_parse_with_metadata(mock_docling_parser, tmp_path):
"""Test that parse() corr... | "user_upload" | assert | string_literal | datapizza-ai-modules/parsers/docling/datapizza/modules/parsers/docling/tests/test_docling_parser.py | test_parse_with_metadata | 135 | null | |
datapizza-labs/datapizza-ai | from unittest.mock import Mock
import pytest
from pydantic import BaseModel
from datapizza.core.clients import Client, ClientResponse
from datapizza.memory.memory import Memory
from datapizza.modules.metatagger.keyword_metatagger import KeywordMetatagger
from datapizza.type import Chunk, StructuredBlock
def mock_cli... | ["AI", "test"] | assert | collection | datapizza-ai-core/datapizza/modules/metatagger/tests/test_keyword_metagger.py | test_process_chunks_concurrent | 114 | null | |
datapizza-labs/datapizza-ai | from datapizza.modules.splitters.text_splitter import TextSplitter
def test_text_splitter_with_overlap():
text_splitter = TextSplitter(max_char=10, overlap=2)
chunks = text_splitter.run("This is a test string")
assert len(chunks) == 3
assert chunks[0].text == "This is a "
assert chunks[0].metadata... | 8 | assert | numeric_literal | datapizza-ai-core/datapizza/modules/splitters/tests/test_text_splitter.py | test_text_splitter_with_overlap | 22 | null | |
datapizza-labs/datapizza-ai | import pytest
from datapizza.tools.filesystem import string_matches_patterns
test_cases = [
# (file_path, regex_patterns, expected_result)
("/home/user/file.sys", ["*.sys"], True),
("/home/user/file.sys", ["/home/*.sys"], True),
("/home/user/file.sys", ["/home/user/*.sys"], True),
("/home/user/fil... | True | assert | bool_literal | datapizza-ai-tools/filesystem/tests/test_file_path_matches_pattern.py | test_empty_patterns_list | 53 | null | |
datapizza-labs/datapizza-ai | import pytest
from datapizza.memory.memory import Memory
from datapizza.type import ROLE, StructuredBlock, TextBlock
from datapizza.clients.google.memory_adapter import GoogleMemoryAdapter
def test_google_memory_to_messages_structured_block():
memory = Memory()
memory.new_turn(role=ROLE.USER)
memory.add_t... | str(messages[0]["parts"][0]) | assert | func_call | datapizza-ai-clients/datapizza-ai-clients-google/tests/test_memory_adapter.py | test_google_memory_to_messages_structured_block | 14 | null | |
datapizza-labs/datapizza-ai | from typing import Any
from ..tools import Tool, tool
def mt_test_function():
return "test"
def decorated_function(x: int, y: str = "default") -> str:
"""Test function docstring"""
return f"{x} {y}"
def test_tool_with_simple_params():
@tool
def mt_test_function(x: int, y: str = "default"):
... | ["x"] | assert | collection | datapizza-ai-core/datapizza/tools/tests/test_tools.py | test_tool_with_simple_params | 57 | null | |
datapizza-labs/datapizza-ai | import contextlib
import uuid
import pytest
from datapizza.core.vectorstore import VectorConfig
from datapizza.type import (
Chunk,
EmbeddingFormat,
SparseEmbedding,
)
from datapizza.vectorstores.milvus import MilvusVectorstore
MILVUS_URI = "./milvus.db"
def unique_coll(prefix="itest"):
return f"{pr... | "v2" | assert | string_literal | datapizza-ai-vectorstores/datapizza-ai-vectorstores-milvus/datapizza/vectorstores/milvus/tests/test_milvus_vectorstore.py | test_update_upsert | 117 | null | |
datapizza-labs/datapizza-ai | from typing import TypeVar
from pydantic import BaseModel
from datapizza.memory.memory import Memory
from datapizza.tools import tool
from datapizza.type import (
ROLE,
FunctionCallBlock,
FunctionCallResultBlock,
Media,
MediaBlock,
StructuredBlock,
TextBlock,
)
Model = TypeVar("Model", bo... | [ { "role": "assistant", "blocks": [ { "type": "structured", "content": {"name": "John", "age": 30}, } ], } ] | assert | collection | datapizza-ai-core/datapizza/memory/tests/test_memory.py | test_structured_json_block | 231 | null | |
datapizza-labs/datapizza-ai | from unittest.mock import patch
import pytest
from datapizza.tools.filesystem import FileSystem
def fs_tool():
return FileSystem()
def temp_dir(tmp_path):
d = tmp_path / "test_dir"
d.mkdir()
(d / "file1.txt").write_text("hello")
(d / "subdir").mkdir()
(d / "subdir" / "file2.txt").write_text(... | True | assert | bool_literal | datapizza-ai-tools/filesystem/tests/test_filesystem.py | test_evaluate_path_on_patterns | 194 | null | |
datapizza-labs/datapizza-ai | def test_init():
assert 1 == | 1 | assert | numeric_literal | datapizza-ai-clients/datapizza-ai-clients-watsonx/tests/test_watsonx.py | test_init | 2 | null | |
datapizza-labs/datapizza-ai | import pytest
from pydantic import BaseModel
from datapizza.clients.mock_client import MockClient
from datapizza.core.clients import Client, ClientResponse
from datapizza.memory.memory import Memory
from datapizza.type import TextBlock
from datapizza.type.type import ROLE
def test_mock_client():
llm = MockClient(... | response | assert | variable | datapizza-ai-core/datapizza/core/clients/tests/test_mock_client.py | test_mock_client | 21 | null | |
datapizza-labs/datapizza-ai | import warnings
import pytest
from datapizza.type import Node, NodeType
from datapizza.modules.parsers.docling.docling_parser import DoclingParser
from datapizza.modules.parsers.docling.ocr_options import OCREngine, OCROptions
def test_parser_with_custom_ocr_options(mock_docling_parser, monkeypatch):
"""Test par... | ["ita"] | assert | collection | datapizza-ai-modules/parsers/docling/datapizza/modules/parsers/docling/tests/test_docling_parser.py | test_parser_with_custom_ocr_options | 76 | null | |
datapizza-labs/datapizza-ai | from pathlib import Path
from datapizza.core.models import PipelineComponent
from datapizza.pipeline import IngestionPipeline
from datapizza.type import Chunk, DenseEmbedding, Node
TEST_DIR = Path(__file__).parent
def test_pipeline():
pipeline = IngestionPipeline(
modules=[
CustomSplitter(),
... | 1 | assert | numeric_literal | datapizza-ai-core/datapizza/pipeline/tests/test_pipeline.py | test_pipeline | 49 | null | |
datapizza-labs/datapizza-ai | from datapizza.cache.redis import RedisCache
def test_redis_cache():
cache = RedisCache(host="localhost", port=6379, db=0)
assert cache is not | None | assert | none_literal | datapizza-ai-cache/redis/tests/test_redis_cache.py | test_redis_cache | 6 | null | |
datapizza-labs/datapizza-ai | from pathlib import Path
from datapizza.clients.mock_client import MockClient
from datapizza.core.clients.client import ClientResponse, StreamInferenceClientModule
from datapizza.core.models import PipelineComponent
from datapizza.embedders.embedders import ClientEmbedder
from datapizza.modules.rewriters import ToolRe... | {"A": "A", "B": "B"} | assert | collection | datapizza-ai-core/datapizza/pipeline/tests/test_graph_pipeline.py | test_graph_pipeline_run_without_keys | 58 | null | |
datapizza-labs/datapizza-ai | from unittest.mock import AsyncMock, MagicMock
import pytest
from ..mcp_client import MCPClient
class TestMCPClientListTools:
@pytest.mark.asyncio
async def test_a_list_tools_uses_session(self):
"""a_list_tools should use _session to list tools."""
client = MCPClient(url="https://example.com... | 1 | assert | numeric_literal | datapizza-ai-core/datapizza/tools/tests/test_mcp_client.py | test_a_list_tools_uses_session | TestMCPClientListTools | 171 | null |
datapizza-labs/datapizza-ai | from pathlib import Path
from datapizza.clients.mock_client import MockClient
from datapizza.core.clients.client import ClientResponse, StreamInferenceClientModule
from datapizza.core.models import PipelineComponent
from datapizza.embedders.embedders import ClientEmbedder
from datapizza.modules.rewriters import ToolRe... | ToolRewriter | assert | variable | datapizza-ai-core/datapizza/pipeline/tests/test_graph_pipeline.py | test_graph_pipeline_from_yaml | 100 | null | |
datapizza-labs/datapizza-ai | import json
import pytest
from datapizza.memory.memory import Memory
from datapizza.tools.tools import tool
from datapizza.type.type import (
ROLE,
FunctionCallBlock,
Media,
MediaBlock,
StructuredBlock,
TextBlock,
)
from openai.types.responses import ResponseFunctionToolCall
from datapizza.cli... | "system" | assert | string_literal | datapizza-ai-clients/datapizza-ai-clients-openai/tests/test_memory_adapter.py | test_memory_to_messages_with_system_prompt | 160 | null | |
datapizza-labs/datapizza-ai | from pathlib import Path
from datapizza.core.models import PipelineComponent
from datapizza.pipeline import IngestionPipeline
from datapizza.type import Chunk, DenseEmbedding, Node
TEST_DIR = Path(__file__).parent
def test_ingestion_pipeline_with_multiple_files():
"""Test issue #63: IngestionPipeline should hand... | 3 | assert | numeric_literal | datapizza-ai-core/datapizza/pipeline/tests/test_pipeline.py | test_ingestion_pipeline_with_multiple_files | 128 | null | |
datapizza-labs/datapizza-ai | import asyncio
from concurrent.futures import ThreadPoolExecutor
from datapizza.agents.agent import PLANNING_PROMT, Agent, StepResult
from datapizza.clients import MockClient
from datapizza.core.clients import ClientResponse
from datapizza.tools import tool
class TestBaseAgents:
def test_agent_stream_text(self):... | "H" | assert | string_literal | datapizza-ai-core/datapizza/agents/tests/test_base_agents.py | test_agent_stream_text | TestBaseAgents | 101 | null |
datapizza-labs/datapizza-ai | from datapizza.memory.memory import Memory
from datapizza.type import ROLE, TextBlock
from datapizza.clients.bedrock import BedrockClient
from datapizza.clients.bedrock.memory_adapter import BedrockMemoryAdapter
def test_bedrock_memory_adapter_multiple_blocks():
"""Test memory adapter with multiple text blocks in... | [ { "role": "user", "content": [{"text": "First message."}, {"text": "Second message."}], }, ] | assert | collection | datapizza-ai-clients/datapizza-ai-clients-bedrock/tests/test_bedrock_memory_adapter.py | test_bedrock_memory_adapter_multiple_blocks | 64 | null | |
datapizza-labs/datapizza-ai | from pathlib import Path
from datapizza.clients.mock_client import MockClient
from datapizza.core.clients.client import ClientResponse, StreamInferenceClientModule
from datapizza.core.models import PipelineComponent
from datapizza.embedders.embedders import ClientEmbedder
from datapizza.modules.rewriters import ToolRe... | "embedder" | assert | string_literal | datapizza-ai-core/datapizza/pipeline/tests/test_graph_pipeline.py | test_graph_pipeline_from_yaml | 104 | null | |
datapizza-labs/datapizza-ai | from datapizza.clients import MockClient
from datapizza.modules.rewriters import ToolRewriter
def test_tool_rewriter():
tool_rewriter = ToolRewriter(
client=MockClient(model_name="test"),
system_prompt="test",
)
assert tool_rewriter is not | None | assert | none_literal | datapizza-ai-core/datapizza/modules/rewriters/tests/test_tool_rewriter.py | test_tool_rewriter | 10 | null | |
datapizza-labs/datapizza-ai | import os
import tempfile
import pytest
from datapizza.modules.parsers.md_parser import MDParser
from datapizza.type import NodeType
def temp_md_file():
content = """# Title
This is a paragraph.
## Section 1
This is section 1.
### Subsection 1.1
Content 1.1.
## Section 2
Content 2.
"""
with tempfile.N... | 2 | assert | numeric_literal | datapizza-ai-core/datapizza/modules/parsers/tests/test_md_parser.py | test_md_parser_hierarchy | 92 | null | |
datapizza-labs/datapizza-ai | from datapizza.memory.memory import Memory
from datapizza.type import ROLE, TextBlock
from datapizza.clients.anthropic import AnthropicClient
from datapizza.clients.anthropic.memory_adapter import AnthropicMemoryAdapter
def test_init_anthropic_client():
client = AnthropicClient(api_key="test")
assert client ... | None | assert | none_literal | datapizza-ai-clients/datapizza-ai-clients-anthropic/tests/test_anthropic_memory_adapter.py | test_init_anthropic_client | 10 | null | |
datapizza-labs/datapizza-ai | import contextlib
import uuid
import pytest
from datapizza.core.vectorstore import VectorConfig
from datapizza.type import (
Chunk,
EmbeddingFormat,
SparseEmbedding,
)
from datapizza.vectorstores.milvus import MilvusVectorstore
MILVUS_URI = "./milvus.db"
def unique_coll(prefix="itest"):
return f"{pr... | 6 | assert | numeric_literal | datapizza-ai-vectorstores/datapizza-ai-vectorstores-milvus/datapizza/vectorstores/milvus/tests/test_milvus_vectorstore.py | test_batch_add | 110 | null | |
datapizza-labs/datapizza-ai | import os
import tempfile
import pytest
from datapizza.modules.parsers.md_parser import MDParser
from datapizza.type import NodeType
def temp_md_file():
content = """# Title
This is a paragraph.
## Section 1
This is section 1.
### Subsection 1.1
Content 1.1.
## Section 2
Content 2.
"""
with tempfile.N... | "Sentence two." | assert | string_literal | datapizza-ai-core/datapizza/modules/parsers/tests/test_md_parser.py | test_md_parser_sentences | 134 | null | |
datapizza-labs/datapizza-ai | from typing import TypeVar
from pydantic import BaseModel
from datapizza.memory.memory import Memory
from datapizza.tools import tool
from datapizza.type import (
ROLE,
FunctionCallBlock,
FunctionCallResultBlock,
Media,
MediaBlock,
StructuredBlock,
TextBlock,
)
Model = TypeVar("Model", bo... | ROLE.USER | assert | complex_expr | datapizza-ai-core/datapizza/memory/tests/test_memory.py | test_memory_deep_copy | 268 | null | |
datapizza-labs/datapizza-ai | import pytest
from pydantic import BaseModel
from datapizza.clients.mock_client import MockClient
from datapizza.core.clients import Client, ClientResponse
from datapizza.memory.memory import Memory
from datapizza.type import TextBlock
from datapizza.type.type import ROLE
def test_memory():
memory = Memory()
... | [textBlock] | assert | collection | datapizza-ai-core/datapizza/core/clients/tests/test_mock_client.py | test_memory | 44 | null | |
datapizza-labs/datapizza-ai | from datapizza.modules.splitters.text_splitter import TextSplitter
def test_text_splitter():
text_splitter = TextSplitter(max_char=10, overlap=0)
chunks = text_splitter.run("This is a test string")
assert len(chunks) == 3
assert chunks[0].text == "This is a "
assert chunks[1].text == | "test strin" | assert | string_literal | datapizza-ai-core/datapizza/modules/splitters/tests/test_text_splitter.py | test_text_splitter | 9 | null | |
datapizza-labs/datapizza-ai | from unittest.mock import Mock, patch
import pytest
from datapizza.tracing.instrumentor import (
DatapizzaMonitoringInstrumentor,
MissingDatapizzaConfigurationError,
)
def required_env(monkeypatch):
monkeypatch.setenv("DATAPIZZA_API_KEY", "test_api_key")
monkeypatch.setenv("DATAPIZZA_PROJECT_ID", "te... | "9.9.9" | assert | string_literal | datapizza-ai-core/datapizza/tracing/tests/test_instrumentor.py | test_explicit_values_override_env | 46 | null | |
datapizza-labs/datapizza-ai | import pytest
from pydantic import BaseModel
from datapizza.clients.mock_client import MockClient
from datapizza.core.clients import Client, ClientResponse
from datapizza.memory.memory import Memory
from datapizza.type import TextBlock
from datapizza.type.type import ROLE
def test_stream_response():
llm = MockCli... | text[i] | assert | complex_expr | datapizza-ai-core/datapizza/core/clients/tests/test_mock_client.py | test_stream_response | 32 | null | |
datapizza-labs/datapizza-ai | from pathlib import Path
from datapizza.core.models import PipelineComponent
from datapizza.pipeline import IngestionPipeline
from datapizza.type import Chunk, DenseEmbedding, Node
TEST_DIR = Path(__file__).parent
def test_pipeline_from_yaml_with_elements():
"""Test that elements section in YAML config correctly... | "TextSplitter" | assert | string_literal | datapizza-ai-core/datapizza/pipeline/tests/test_pipeline.py | test_pipeline_from_yaml_with_elements | 186 | null | |
datapizza-labs/datapizza-ai | from datapizza.clients.mistral import MistralClient
def test_init_mistral_client():
client = MistralClient(api_key="test")
assert client is not | None | assert | none_literal | datapizza-ai-clients/datapizza-ai-clients-mistral/tests/test_mistral_client.py | test_init_mistral_client | 6 | null | |
datapizza-labs/datapizza-ai | import json
import pytest
from datapizza.memory.memory import Memory
from datapizza.tools.tools import tool
from datapizza.type.type import (
ROLE,
FunctionCallBlock,
Media,
MediaBlock,
StructuredBlock,
TextBlock,
)
from openai.types.responses import ResponseFunctionToolCall
from datapizza.cli... | expected | assert | variable | datapizza-ai-clients/datapizza-ai-clients-openai/tests/test_memory_adapter.py | test_memory_to_messages_multiple_turns | 85 | null | |
datapizza-labs/datapizza-ai | import asyncio
from concurrent.futures import ThreadPoolExecutor
from datapizza.agents.agent import PLANNING_PROMT, Agent, StepResult
from datapizza.clients import MockClient
from datapizza.core.clients import ClientResponse
from datapizza.tools import tool
class TestStatelessAgents:
async def test_func():
... | 6 | assert | numeric_literal | datapizza-ai-core/datapizza/agents/tests/test_base_agents.py | test_func | TestStatelessAgents | 159 | null |
datapizza-labs/datapizza-ai | from unittest.mock import Mock
import pytest
from pydantic import BaseModel
from datapizza.core.clients import Client, ClientResponse
from datapizza.memory.memory import Memory
from datapizza.modules.metatagger.keyword_metatagger import KeywordMetatagger
from datapizza.type import Chunk, StructuredBlock
def mock_cli... | 2 | assert | numeric_literal | datapizza-ai-core/datapizza/modules/metatagger/tests/test_keyword_metagger.py | test_keyword_metatagger_initialization | 46 | null | |
datapizza-labs/datapizza-ai | import contextlib
import uuid
import pytest
from datapizza.core.vectorstore import VectorConfig
from datapizza.type import (
Chunk,
EmbeddingFormat,
SparseEmbedding,
)
from datapizza.vectorstores.milvus import MilvusVectorstore
MILVUS_URI = "./milvus.db"
def unique_coll(prefix="itest"):
return f"{pr... | 1 | assert | numeric_literal | datapizza-ai-vectorstores/datapizza-ai-vectorstores-milvus/datapizza/vectorstores/milvus/tests/test_milvus_vectorstore.py | test_add_and_retrieve_roundtrip | 94 | null | |
datapizza-labs/datapizza-ai | import pytest
from datapizza.core.vectorstore import VectorConfig
from datapizza.type import EmbeddingFormat
def test_vector_config_model_post_init():
with pytest.raises( | ValueError) | pytest.raises | variable | datapizza-ai-core/datapizza/core/vectorstore/tests/test_vectorstore_models.py | test_vector_config_model_post_init | 8 | null | |
datapizza-labs/datapizza-ai | from unittest.mock import AsyncMock, MagicMock
import pytest
from ..mcp_client import MCPClient
class TestMCPClientInit:
def test_init_with_command(self):
client = MCPClient(command="uvx", args=["my-server"])
assert client.command == | "uvx" | assert | string_literal | datapizza-ai-core/datapizza/tools/tests/test_mcp_client.py | test_init_with_command | TestMCPClientInit | 22 | null |
datapizza-labs/datapizza-ai | from unittest.mock import Mock
import pytest
from pydantic import BaseModel
from datapizza.core.clients import Client, ClientResponse
from datapizza.memory.memory import Memory
from datapizza.modules.metatagger.keyword_metatagger import KeywordMetatagger
from datapizza.type import Chunk, StructuredBlock
def mock_cli... | ["machine learning", "deep learning"] | assert | collection | datapizza-ai-core/datapizza/modules/metatagger/tests/test_keyword_metagger.py | test_process_chunks_concurrent | 115 | null | |
datapizza-labs/datapizza-ai | import pytest
from datapizza.memory.memory import Memory
from datapizza.type import ROLE, StructuredBlock, TextBlock
from datapizza.clients.google.memory_adapter import GoogleMemoryAdapter
def test_google_memory_to_messages_with_system_prompt():
memory = Memory()
memory.new_turn(role=ROLE.USER)
memory.add... | str(messages[0]["parts"]) | assert | func_call | datapizza-ai-clients/datapizza-ai-clients-google/tests/test_memory_adapter.py | test_google_memory_to_messages_with_system_prompt | 26 | null | |
datapizza-labs/datapizza-ai | from pathlib import Path
from datapizza.clients.mock_client import MockClient
from datapizza.core.clients.client import ClientResponse, StreamInferenceClientModule
from datapizza.core.models import PipelineComponent
from datapizza.embedders.embedders import ClientEmbedder
from datapizza.modules.rewriters import ToolRe... | "rewriter" | assert | string_literal | datapizza-ai-core/datapizza/pipeline/tests/test_graph_pipeline.py | test_graph_pipeline_from_yaml | 103 | null | |
zhongyu09/openchatbi | from unittest.mock import MagicMock, patch
import pytest
import yaml
from openchatbi.config_loader import Config, ConfigLoader
class TestConfigLoader:
def test_load_config_with_bi_config_file(self, temp_dir):
"""Test loading configuration with BI config file."""
bi_config_data = {"metrics": ["re... | ["revenue", "users"] | assert | collection | tests/test_config_loader.py | test_load_config_with_bi_config_file | TestConfigLoader | 152 | null |
zhongyu09/openchatbi | import io
from unittest.mock import patch
import pytest
from openchatbi.utils import log
class TestUtilityFunctions:
@patch("sys.stderr")
def test_log_function_stderr_error(self, mock_stderr):
"""Test logging when stderr has issues."""
mock_stderr.write.side_effect = OSError("stderr error")
... | OSError, match="stderr error") | pytest.raises | complex_expr | tests/test_utils.py | test_log_function_stderr_error | TestUtilityFunctions | 94 | null |
zhongyu09/openchatbi | import pytest
from pydantic import ValidationError
from openchatbi.tool.ask_human import AskHuman
class TestAskHuman:
def test_ask_human_serialization(self):
"""Test AskHuman model serialization."""
ask_human = AskHuman(question="Which analysis method?", options=["Statistical", "Machine Learning"... | ["Statistical", "Machine Learning"] | assert | collection | tests/test_tools_ask_human.py | test_ask_human_serialization | TestAskHuman | 43 | null |
zhongyu09/openchatbi | import pytest
from openchatbi.text2sql.visualization import ChartType, VisualizationConfig, VisualizationDSL, VisualizationService
class TestVisualizationService:
def test_visualization_config_dataclass(self):
"""Test VisualizationConfig dataclass."""
config = VisualizationConfig(
cha... | "value" | assert | string_literal | tests/test_text2sql_visualization.py | test_visualization_config_dataclass | TestVisualizationService | 232 | null |
zhongyu09/openchatbi | from unittest.mock import Mock, patch
import pytest
from langchain_core.messages import AIMessage, HumanMessage, ToolMessage
from langchain_core.tools import StructuredTool
from openchatbi.agent_graph import _build_graph_core, agent_llm_call, build_agent_graph_async, build_agent_graph_sync
from openchatbi.context_con... | [] | assert | collection | tests/context_management/test_agent_graph_integration.py | test_empty_message_handling | TestContextManagementEdgeCases | 275 | null |
zhongyu09/openchatbi | from unittest.mock import Mock, patch
import pytest
from openchatbi.catalog.catalog_loader import DataCatalogLoader, load_catalog_from_data_warehouse
class TestDataCatalogLoader:
def mock_engine(self):
"""Mock SQLAlchemy engine."""
engine = Mock()
return engine
def test_catalog_load... | None | assert | none_literal | tests/test_catalog_loader.py | test_catalog_loader_without_include_tables | TestDataCatalogLoader | 35 | null |
zhongyu09/openchatbi | import pytest
from openchatbi.text2sql.visualization import ChartType, VisualizationConfig, VisualizationDSL, VisualizationService
class TestVisualizationService:
def test_generate_visualization_dsl_error_handling(self):
"""Test DSL generation with error in schema info."""
schema_info = {"error":... | "table" | assert | string_literal | tests/test_text2sql_visualization.py | test_generate_visualization_dsl_error_handling | TestVisualizationService | 55 | null |
zhongyu09/openchatbi | from unittest.mock import Mock, patch
import pytest
from langchain_core.messages import AIMessage, HumanMessage, SystemMessage, ToolMessage
from openchatbi.context_config import ContextConfig
from openchatbi.context_manager import ContextManager
class TestContextManager:
def mock_llm(self):
"""Mock LLM ... | short_output | assert | variable | tests/context_management/test_context_manager.py | test_trim_short_tool_output | TestContextManager | 70 | null |
zhongyu09/openchatbi | from langchain_core.messages import AIMessage, HumanMessage, ToolMessage
from openchatbi.graph_state import AgentState, InputState, OutputState
class TestOutputState:
def test_output_state_with_multiple_messages(self):
"""Test OutputState with conversation history."""
messages = [
Hum... | 4 | assert | numeric_literal | tests/test_graph_state.py | test_output_state_with_multiple_messages | TestOutputState | 108 | null |
zhongyu09/openchatbi | import json
from datetime import date
from unittest.mock import Mock, patch
from langchain_core.messages import AIMessage, HumanMessage
from openchatbi.graph_state import SQLGraphState
from openchatbi.text2sql.extraction import (
generate_extraction_prompt,
information_extraction,
information_extraction_c... | prompt | assert | variable | tests/test_text2sql_extraction.py | test_generate_extraction_prompt | TestText2SQLExtraction | 27 | null |
zhongyu09/openchatbi | import plotly.graph_objects as go
import pytest
from sample_ui.plotly_utils import (
create_empty_chart,
create_plotly_chart,
visualization_dsl_to_gradio_plot,
)
def sample_csv_data():
"""Sample CSV data for testing."""
return """product,sales,region,month
Widget A,10000,North,Jan
Widget B,15000,S... | "table" | assert | string_literal | tests/test_plotly_utils.py | test_create_table_chart | TestPlotlyChartCreation | 175 | null |
zhongyu09/openchatbi | from unittest.mock import Mock, patch
import pytest
from langchain_core.messages import AIMessage, HumanMessage, ToolMessage
from openchatbi.context_config import ContextConfig
from openchatbi.context_manager import ContextManager
class TestMessageBasedContextManagement:
def context_manager(self, test_config):
... | original_count | assert | variable | tests/context_management/test_state_operations.py | test_historical_tool_compression | TestMessageBasedContextManagement | 78 | null |
zhongyu09/openchatbi | from unittest.mock import Mock, patch
import pytest
from langchain_core.messages import AIMessage, HumanMessage, ToolMessage
from openchatbi.context_config import ContextConfig
from openchatbi.context_manager import ContextManager
class TestContextManagementEdgeCases:
def edge_case_config(self):
"""Conf... | 1 | assert | numeric_literal | tests/context_management/test_edge_cases.py | test_extremely_long_single_message | TestContextManagementEdgeCases | 70 | null |
zhongyu09/openchatbi | from unittest.mock import patch
from openchatbi.tool.run_python_code import run_python_code
class TestRunPythonCode:
def test_run_python_code_executor_selection(self):
"""Test that LocalExecutor is properly instantiated and used."""
reasoning = "Testing executor instantiation"
code = "pri... | code) | assert_* | variable | tests/test_tools_run_python_code.py | test_run_python_code_executor_selection | TestRunPythonCode | 346 | null |
zhongyu09/openchatbi | import json
from datetime import date
from unittest.mock import Mock, patch
from langchain_core.messages import AIMessage, HumanMessage
from openchatbi.graph_state import SQLGraphState
from openchatbi.text2sql.extraction import (
generate_extraction_prompt,
information_extraction,
information_extraction_c... | result | assert | variable | tests/test_text2sql_extraction.py | test_parse_extracted_info_json_valid | TestText2SQLExtraction | 50 | null |
zhongyu09/openchatbi | from unittest.mock import Mock
from langchain_core.messages import AIMessage, HumanMessage, ToolMessage
from openchatbi.agent_graph import agent_llm_call
from openchatbi.graph_state import AgentState
from openchatbi.utils import recover_incomplete_tool_calls
class TestIncompleteToolCallRecovery:
def test_partia... | str(type(operations[0])) | assert | func_call | tests/test_incomplete_tool_calls.py | test_partial_incomplete_tool_calls | TestIncompleteToolCallRecovery | 110 | null |
zhongyu09/openchatbi | import pytest
from openchatbi.utils import SimpleStore
class TestSimpleStore:
def sample_texts(self):
"""Sample texts for testing."""
return [
"Python is a programming language",
"Machine learning is a subset of AI",
"Deep learning uses neural networks",
... | 2 | assert | numeric_literal | tests/test_simple_store.py | test_similarity_search | TestSimpleStore | 64 | null |
zhongyu09/openchatbi | import pytest
from openchatbi.text2sql.visualization import ChartType, VisualizationConfig, VisualizationDSL, VisualizationService
class TestVisualizationService:
def test_generate_visualization_dsl_basic(self):
"""Test basic DSL generation with schema info."""
schema_info = {
"column... | "bar" | assert | string_literal | tests/test_text2sql_visualization.py | test_generate_visualization_dsl_basic | TestVisualizationService | 26 | null |
zhongyu09/openchatbi | from pathlib import Path
from unittest.mock import AsyncMock, Mock, patch
import pytest
from langchain_core.language_models import FakeListChatModel
from langchain_openai import ChatOpenAI
pysqlite3 = pytest.importorskip("pysqlite3", reason="pysqlite3 not available")
from openchatbi.tool.memory import (
Structur... | "Spanish" | assert | string_literal | tests/test_memory.py | test_user_profile_partial_initialization | TestUserProfile | 53 | null |
zhongyu09/openchatbi | import pytest
from openchatbi.catalog.catalog_store import CatalogStore
from openchatbi.catalog.store.file_system import FileSystemCatalogStore
class TestFileSystemCatalogStore:
def test_get_tables_from_csv(self, mock_catalog_store):
"""Test getting tables from CSV file."""
tables = mock_catalog_... | 1 | assert | numeric_literal | tests/test_catalog_store.py | test_get_tables_from_csv | TestFileSystemCatalogStore | 45 | null |
zhongyu09/openchatbi | from unittest.mock import MagicMock, patch
import pytest
import yaml
from openchatbi.config_loader import Config, ConfigLoader
class TestConfigLoader:
def test_config_initialization(self):
"""Test Config model initialization."""
from unittest.mock import MagicMock
mock_llm = MagicMock()... | mock_embedding | assert | variable | tests/test_config_loader.py | test_config_initialization | TestConfigLoader | 25 | null |
zhongyu09/openchatbi | import pytest
from openchatbi.utils import SimpleStore
class TestSimpleStore:
def sample_texts(self):
"""Sample texts for testing."""
return [
"Python is a programming language",
"Machine learning is a subset of AI",
"Deep learning uses neural networks",
... | 3 | assert | numeric_literal | tests/test_simple_store.py | test_max_marginal_relevance_search | TestSimpleStore | 222 | null |
zhongyu09/openchatbi | from unittest.mock import Mock
from langchain_core.messages import AIMessage, HumanMessage, ToolMessage
from openchatbi.agent_graph import agent_llm_call
from openchatbi.graph_state import AgentState
from openchatbi.utils import recover_incomplete_tool_calls
class TestIncompleteToolCallRecovery:
def test_partia... | "Search completed" | assert | string_literal | tests/test_incomplete_tool_calls.py | test_partial_incomplete_tool_calls | TestIncompleteToolCallRecovery | 122 | null |
zhongyu09/openchatbi | from openchatbi.context_config import ContextConfig, get_context_config, update_context_config
class TestContextConfig:
def test_update_context_config_multiple_values(self):
"""Test updating multiple configuration values."""
updated_config = update_context_config(
summary_trigger_token... | 15 | assert | numeric_literal | tests/context_management/test_context_config.py | test_update_context_config_multiple_values | TestContextConfig | 88 | null |
zhongyu09/openchatbi | from unittest.mock import Mock, patch
import pytest
from langchain_core.messages import AIMessage
from openchatbi.graph_state import SQLGraphState
from openchatbi.text2sql.schema_linking import schema_linking
class TestText2SQLSchemaLinking:
def mock_llm(self):
"""Mock LLM for testing."""
llm = ... | 2 | assert | numeric_literal | tests/test_text2sql_schema_linking.py | test_select_table_with_examples | TestText2SQLSchemaLinking | 166 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.