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 |
|---|---|---|---|---|---|---|---|---|---|
bitcart/bitcart | from __future__ import annotations
import json
from typing import TYPE_CHECKING, Any
import httpx
import pytest
import pytest_mock
from bitcart.errors import BaseError as BitcartBaseError
from api.constants import BACKUP_FREQUENCIES, BACKUP_PROVIDERS, FEE_ETA_TARGETS, MAX_CONFIRMATION_WATCH
from api.schemas.misc imp... | 3 | assert | numeric_literal | tests/test_views/test_views_validation.py | test_edge_fiatlist_cases_faulty | 197 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import contextlib
import os
import pathlib
import shlex
import subprocess
import time
from collections.abc import Callable
from dataclasses import dataclass
from datetime import UTC, datetime, timedelta
from decimal import Decimal
from typing import TYPE_CHECKING, Any,... | 8 | assert | numeric_literal | tests/test_utils.py | test_broken_coin | 312 | null | |
bitcart/bitcart | import pytest
from api.ext.ssh import parse_connection_string
@pytest.mark.parametrize(
("connection_str", "host", "port", "username"),
[
("", "", 22, ""),
("test.com", "test.com", 22, "root"),
("user@test.com", "test.com", 22, "user"),
("test.com:1", "test.com", 1, "root"),
... | username | assert | variable | tests/test_ext/test_ssh.py | test_parse_connection_string | 24 | null | |
bitcart/bitcart | from __future__ import annotations
import json as json_module
from typing import TYPE_CHECKING, Any
import pytest
pytestmark = pytest.mark.anyio
class MetadataTestMixin:
name: str # name used in endpoints
tests: dict[str, Any]
json_encoding: bool = True
async def setup(self, client: TestClient, to... | self.expected_metadata | assert | complex_expr | tests/test_views/test_views_metadata.py | check_get_all | MetadataTestMixin | 68 | null |
bitcart/bitcart | from __future__ import annotations
import json as json_module
from datetime import datetime
from typing import TYPE_CHECKING, Any
import pytest
from api.constants import ID_LENGTH
pytestmark = pytest.mark.anyio
def assert_contains(expected: dict[str, Any], actual: dict[str, Any]) -> None:
missing = set(expecte... | None | assert | none_literal | tests/test_views/test_model_views.py | setup | ViewTestMixin | 61 | null |
bitcart/bitcart | from __future__ import annotations
from datetime import timedelta
from typing import TYPE_CHECKING, Any
from urllib.parse import quote
import pytest
from dishka import Scope
from fastapi import FastAPI
from api import utils
from api.services.crud.repositories.invoices import InvoiceRepository
from tests.helper impor... | value | assert | variable | tests/test_views/test_views_paginations.py | check_query | 81 | null | |
bitcart/bitcart | import pytest
from api import exceptions, templates
def test_text_template_render() -> None:
template = templates.Template("test", "Hello {{var}}!")
assert template.name == "test"
assert template.template_text == "Hello {{var}}!"
assert template.render() == | "Hello !" | assert | string_literal | tests/test_templates.py | test_text_template_render | 27 | null | |
bitcart/bitcart | from __future__ import annotations
import json as json_module
from typing import TYPE_CHECKING, Any
import pytest
pytestmark = pytest.mark.anyio
class MetadataTestMixin:
name: str # name used in endpoints
tests: dict[str, Any]
json_encoding: bool = True
async def setup(self, client: TestClient, to... | objects[0] | assert | complex_expr | tests/test_views/test_views_metadata.py | check_get_all | MetadataTestMixin | 67 | null |
bitcart/bitcart | from __future__ import annotations
import json
from typing import TYPE_CHECKING, Any
import httpx
import pytest
import pytest_mock
from bitcart.errors import BaseError as BitcartBaseError
from api.constants import BACKUP_FREQUENCIES, BACKUP_PROVIDERS, FEE_ETA_TARGETS, MAX_CONFIRMATION_WATCH
from api.schemas.misc imp... | 404 | assert | numeric_literal | tests/test_views/test_views_validation.py | test_invalid_fk_constaint | 130 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import json as json_module
import os
from collections import defaultdict
from decimal import Decimal
from typing import TYPE_CHECKING, Any, cast
import pyotp
import pytest
import pytest_mock
from bitcart import BTC, LTC # type: ignore
from bitcart.errors import BaseE... | 0 | assert | numeric_literal | tests/test_views/test_views.py | test_export_invoices | 709 | null | |
bitcart/bitcart | import pytest
from api import exceptions, templates
def test_default_template_render(notification_template: str) -> None:
template = templates.Template("notification")
assert template.name == | "notification" | assert | string_literal | tests/test_templates.py | test_default_template_render | 12 | null | |
bitcart/bitcart | import pytest
from api import exceptions, templates
def test_unknown_template_render() -> None:
with pytest.raises( | exceptions.TemplateLoadError) | pytest.raises | complex_expr | tests/test_templates.py | test_unknown_template_render | 19 | null | |
bitcart/bitcart | import ipaddress
import os
from collections.abc import AsyncIterator
import pytest
from fastapi import FastAPI
from api.services.ext.tor import HiddenService, PortDefinition, TorService
async def tor_service(app: FastAPI) -> AsyncIterator[TorService]:
yield await app.state.dishka_container.get(TorService)
def t... | [ HiddenService( os.path.basename(service_dir), service_dir, "http://test.onion", PortDefinition(80, str(ipaddress.ip_address("127.0.0.1")), 80), ) ] | assert | collection | tests/test_ext/test_tor.py | test_parse_torrc | 61 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import signal
from collections.abc import AsyncIterator, Awaitable, Callable, Iterator
from decimal import Decimal
from queue import Queue
from typing import TYPE_CHECKING, Any, cast
import pytest
from aiohttp import web
from bitcart import BTC # type: ignore
from bi... | speed | assert | variable | tests/functional/test_functional.py | test_onchain_pay_flow | 230 | null | |
bitcart/bitcart | import io
from typing import Any
import pytest
from dishka import Scope
from fastapi import FastAPI
from api.ext.export import db_to_json, json_to_csv, merge_keys
from api.services.crud.invoices import InvoiceService
def test_merge_keys() -> None:
assert merge_keys(None, "test") == | "test" | assert | string_literal | tests/test_ext/test_export.py | test_merge_keys | 13 | null | |
bitcart/bitcart | import pytest
from api import exceptions, templates
def test_add_template() -> None:
manager = templates.TemplateManager()
template = templates.Template("product")
manager.add_template(template)
assert manager.templates["product"] == | template | assert | variable | tests/test_templates.py | test_add_template | 35 | null | |
bitcart/bitcart | from __future__ import annotations
import json
from typing import TYPE_CHECKING, Any
import httpx
import pytest
import pytest_mock
from bitcart.errors import BaseError as BitcartBaseError
from api.constants import BACKUP_FREQUENCIES, BACKUP_PROVIDERS, FEE_ETA_TARGETS, MAX_CONFIRMATION_WATCH
from api.schemas.misc imp... | 0 | assert | numeric_literal | tests/test_views/test_views_validation.py | test_edge_fiatlist_cases_no_cryptos | 190 | null | |
bitcart/bitcart | from __future__ import annotations
import json as json_module
from datetime import datetime
from typing import TYPE_CHECKING, Any
import pytest
from api.constants import ID_LENGTH
pytestmark = pytest.mark.anyio
def assert_contains(expected: dict[str, Any], actual: dict[str, Any]) -> None:
missing = set(expecte... | 404 | assert | numeric_literal | tests/test_views/test_model_views.py | test_delete | ViewTestMixin | 189 | null |
bitcart/bitcart | from __future__ import annotations
from datetime import timedelta
from typing import TYPE_CHECKING, Any
from urllib.parse import quote
import pytest
from dishka import Scope
from fastapi import FastAPI
from api import utils
from api.services.crud.repositories.invoices import InvoiceRepository
from tests.helper impor... | {"id", "name"} | assert | collection | tests/test_views/test_views_paginations.py | test_autocomplete_response_format | 144 | null | |
bitcart/bitcart | import ipaddress
import os
from collections.abc import AsyncIterator
import pytest
from fastapi import FastAPI
from api.services.ext.tor import HiddenService, PortDefinition, TorService
async def tor_service(app: FastAPI) -> AsyncIterator[TorService]:
yield await app.state.dishka_container.get(TorService)
def t... | PortDefinition( 80, str(ipaddress.ip_address("127.0.0.1")), 80 ) | assert | func_call | tests/test_ext/test_tor.py | test_parse_hidden_service_port | 41 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import signal
from collections.abc import AsyncIterator, Awaitable, Callable, Iterator
from decimal import Decimal
from queue import Queue
from typing import TYPE_CHECKING, Any, cast
import pytest
from aiohttp import web
from bitcart import BTC # type: ignore
from bi... | True | assert | bool_literal | tests/functional/test_functional.py | apply_batch_payout_action | 346 | null | |
bitcart/bitcart | from __future__ import annotations
import json as json_module
from typing import TYPE_CHECKING, Any
import pytest
pytestmark = pytest.mark.anyio
class MetadataTestMixin:
name: str # name used in endpoints
tests: dict[str, Any]
json_encoding: bool = True
async def setup(self, client: TestClient, to... | 200 | assert | numeric_literal | tests/test_views/test_views_metadata.py | create_object | MetadataTestMixin | 45 | null |
bitcart/bitcart | from __future__ import annotations
import json
from typing import TYPE_CHECKING, Any
import httpx
import pytest
import pytest_mock
from bitcart.errors import BaseError as BitcartBaseError
from api.constants import BACKUP_FREQUENCIES, BACKUP_PROVIDERS, FEE_ETA_TARGETS, MAX_CONFIRMATION_WATCH
from api.schemas.misc imp... | 200 | assert | numeric_literal | tests/test_views/test_views_validation.py | test_wallet_invalid_xpub | 52 | null | |
bitcart/bitcart | from __future__ import annotations
from datetime import timedelta
from typing import TYPE_CHECKING, Any
from urllib.parse import quote
import pytest
from dishka import Scope
from fastapi import FastAPI
from api import utils
from api.services.crud.repositories.invoices import InvoiceRepository
from tests.helper impor... | 200 | assert | numeric_literal | tests/test_views/test_views_paginations.py | test_multiple_query | 26 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import signal
from collections.abc import AsyncIterator, Awaitable, Callable, Iterator
from decimal import Decimal
from queue import Queue
from typing import TYPE_CHECKING, Any, cast
import pytest
from aiohttp import web
from bitcart import BTC # type: ignore
from bi... | None | assert | none_literal | tests/functional/test_functional.py | test_payouts | 395 | null | |
bitcart/bitcart | from __future__ import annotations
import json as json_module
import random
from collections.abc import Iterator
from contextlib import contextmanager
from datetime import timedelta
from typing import TYPE_CHECKING, Any
from api import utils
from api.settings import Settings
from tests.fixtures import static_data
as... | 200 | assert | numeric_literal | tests/helper.py | create_model_obj | 145 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import signal
from collections.abc import AsyncIterator, Awaitable, Callable, Iterator
from decimal import Decimal
from queue import Queue
from typing import TYPE_CHECKING, Any, cast
import pytest
from aiohttp import web
from bitcart import BTC # type: ignore
from bi... | expected_status | assert | variable | tests/functional/test_functional.py | check_payout_status | 352 | null | |
bitcart/bitcart | import ipaddress
import os
from collections.abc import AsyncIterator
import pytest
from fastapi import FastAPI
from api.services.ext.tor import HiddenService, PortDefinition, TorService
async def tor_service(app: FastAPI) -> AsyncIterator[TorService]:
yield await app.state.dishka_container.get(TorService)
def t... | "test 1" | assert | string_literal | tests/test_ext/test_tor.py | test_get_service_name | 54 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import contextlib
import os
import pathlib
import shlex
import subprocess
import time
from collections.abc import Callable
from dataclasses import dataclass
from datetime import UTC, datetime, timedelta
from decimal import Decimal
from typing import TYPE_CHECKING, Any,... | {} | assert | collection | tests/test_utils.py | test_search_query_parsing | 320 | null | |
bitcart/bitcart | import pytest
from api import exceptions, templates
def test_default_template_render(notification_template: str) -> None:
template = templates.Template("notification")
assert template.name == "notification"
assert template.template_text == | notification_template | assert | variable | tests/test_templates.py | test_default_template_render | 13 | null | |
bitcart/bitcart | from __future__ import annotations
from datetime import timedelta
from typing import TYPE_CHECKING, Any
from urllib.parse import quote
import pytest
from dishka import Scope
from fastapi import FastAPI
from api import utils
from api.services.crud.repositories.invoices import InvoiceRepository
from tests.helper impor... | 1 | assert | numeric_literal | tests/test_views/test_views_paginations.py | test_token_pagination | 69 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import signal
from collections.abc import AsyncIterator, Awaitable, Callable, Iterator
from decimal import Decimal
from queue import Queue
from typing import TYPE_CHECKING, Any, cast
import pytest
from aiohttp import web
from bitcart import BTC # type: ignore
from bi... | 1 | assert | numeric_literal | tests/functional/test_functional.py | test_lightning_pay_flow | 327 | null | |
bitcart/bitcart | from __future__ import annotations
import json as json_module
from datetime import datetime
from typing import TYPE_CHECKING, Any
import pytest
from api.constants import ID_LENGTH
pytestmark = pytest.mark.anyio
def assert_contains(expected: dict[str, Any], actual: dict[str, Any]) -> None:
missing = set(expecte... | 200 | assert | numeric_literal | tests/test_views/test_model_views.py | create_object | ViewTestMixin | 89 | null |
bitcart/bitcart | from __future__ import annotations
from datetime import timedelta
from typing import TYPE_CHECKING, Any
from urllib.parse import quote
import pytest
from dishka import Scope
from fastapi import FastAPI
from api import utils
from api.services.crud.repositories.invoices import InvoiceRepository
from tests.helper impor... | expected_count | assert | variable | tests/test_views/test_views_paginations.py | check_query | 78 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import contextlib
import os
import pathlib
import shlex
import subprocess
import time
from collections.abc import Callable
from dataclasses import dataclass
from datetime import UTC, datetime, timedelta
from decimal import Decimal
from typing import TYPE_CHECKING, Any,... | 200 | assert | numeric_literal | tests/test_utils.py | test_get_template | 109 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import json as json_module
import os
from collections import defaultdict
from decimal import Decimal
from typing import TYPE_CHECKING, Any, cast
import pyotp
import pytest
import pytest_mock
from bitcart import BTC, LTC # type: ignore
from bitcart.errors import BaseE... | 2 | assert | numeric_literal | tests/test_views/test_views.py | test_multiple_wallets_same_currency | 1,199 | null | |
bitcart/bitcart | import pytest
from api import exceptions, templates
def test_default_template_render(notification_template: str) -> None:
template = templates.Template("notification")
assert template.name == "notification"
assert template.template_text == notification_template
assert template.render() == "" # Silent... | "New order from test@test.com for !" | assert | string_literal | tests/test_templates.py | test_default_template_render | 15 | null | |
bitcart/bitcart | from __future__ import annotations
import json as json_module
from datetime import datetime
from typing import TYPE_CHECKING, Any
import pytest
from api.constants import ID_LENGTH
pytestmark = pytest.mark.anyio
def assert_contains(expected: dict[str, Any], actual: dict[str, Any]) -> None:
missing = set(expecte... | data | assert | variable | tests/test_views/test_model_views.py | _check_key | ViewTestMixin | 100 | null |
bitcart/bitcart | import pytest
from api import exceptions, templates
def test_text_template_render() -> None:
template = templates.Template("test", "Hello {{var}}!")
assert template.name == | "test" | assert | string_literal | tests/test_templates.py | test_text_template_render | 25 | null | |
bitcart/bitcart | import pytest
from api.ext.ssh import parse_connection_string
@pytest.mark.parametrize(
("connection_str", "host", "port", "username"),
[
("", "", 22, ""),
("test.com", "test.com", 22, "root"),
("user@test.com", "test.com", 22, "user"),
("test.com:1", "test.com", 1, "root"),
... | 3 | assert | numeric_literal | tests/test_ext/test_ssh.py | test_parse_connection_string | 21 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import contextlib
import os
import pathlib
import shlex
import subprocess
import time
from collections.abc import Callable
from dataclasses import dataclass
from datetime import UTC, datetime, timedelta
from decimal import Decimal
from typing import TYPE_CHECKING, Any,... | True | assert | bool_literal | tests/test_utils.py | test_run_host | 231 | null | |
bitcart/bitcart | from __future__ import annotations
from datetime import timedelta
from typing import TYPE_CHECKING, Any
from urllib.parse import quote
import pytest
from dishka import Scope
from fastapi import FastAPI
from api import utils
from api.services.crud.repositories.invoices import InvoiceRepository
from tests.helper impor... | first_id | assert | variable | tests/test_views/test_views_paginations.py | check_start_date_query | 109 | null | |
bitcart/bitcart | import pytest
from api import exceptions, templates
def test_default_template_render(notification_template: str) -> None:
template = templates.Template("notification")
assert template.name == "notification"
assert template.template_text == notification_template
assert template.render() == | "" | assert | string_literal | tests/test_templates.py | test_default_template_render | 14 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import signal
from collections.abc import AsyncIterator, Awaitable, Callable, Iterator
from decimal import Decimal
from queue import Queue
from typing import TYPE_CHECKING, Any, cast
import pytest
from aiohttp import web
from bitcart import BTC # type: ignore
from bi... | 200 | assert | numeric_literal | tests/functional/test_functional.py | get_status | 54 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import contextlib
import os
import pathlib
import shlex
import subprocess
import time
from collections.abc import Callable
from dataclasses import dataclass
from datetime import UTC, datetime, timedelta
from decimal import Decimal
from typing import TYPE_CHECKING, Any,... | 11 | assert | numeric_literal | tests/test_utils.py | test_gen_recovery_code | 472 | null | |
bitcart/bitcart | import ipaddress
import os
from collections.abc import AsyncIterator
import pytest
from fastapi import FastAPI
from api.services.ext.tor import HiddenService, PortDefinition, TorService
async def tor_service(app: FastAPI) -> AsyncIterator[TorService]:
yield await app.state.dishka_container.get(TorService)
def t... | "http://test.onion" | assert | string_literal | tests/test_ext/test_tor.py | test_get_hostname | 49 | null | |
bitcart/bitcart | import pytest
from api.ext.ssh import parse_connection_string
@pytest.mark.parametrize(
("connection_str", "host", "port", "username"),
[
("", "", 22, ""),
("test.com", "test.com", 22, "root"),
("user@test.com", "test.com", 22, "user"),
("test.com:1", "test.com", 1, "root"),
... | port | assert | variable | tests/test_ext/test_ssh.py | test_parse_connection_string | 23 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import json as json_module
import os
from collections import defaultdict
from decimal import Decimal
from typing import TYPE_CHECKING, Any, cast
import pyotp
import pytest
import pytest_mock
from bitcart import BTC, LTC # type: ignore
from bitcart.errors import BaseE... | 4 | assert | numeric_literal | tests/test_views/test_views.py | test_fiatlist_multi_coins | 161 | null | |
bitcart/bitcart | from __future__ import annotations
import json
from typing import TYPE_CHECKING, Any
import httpx
import pytest
import pytest_mock
from bitcart.errors import BaseError as BitcartBaseError
from api.constants import BACKUP_FREQUENCIES, BACKUP_PROVIDERS, FEE_ETA_TARGETS, MAX_CONFIRMATION_WATCH
from api.schemas.misc imp... | None | assert | none_literal | tests/test_views/test_views_validation.py | test_access_control_strict | 237 | null | |
bitcart/bitcart | from __future__ import annotations
import json as json_module
from datetime import datetime
from typing import TYPE_CHECKING, Any
import pytest
from api.constants import ID_LENGTH
pytestmark = pytest.mark.anyio
def assert_contains(expected: dict[str, Any], actual: dict[str, Any]) -> None:
missing = set(expecte... | 401 | assert | numeric_literal | tests/test_views/test_model_views.py | create_object | ViewTestMixin | 85 | null |
bitcart/bitcart | import pytest
from api.ext.ssh import parse_connection_string
@pytest.mark.parametrize(
("connection_str", "host", "port", "username"),
[
("", "", 22, ""),
("test.com", "test.com", 22, "root"),
("user@test.com", "test.com", 22, "user"),
("test.com:1", "test.com", 1, "root"),
... | host | assert | variable | tests/test_ext/test_ssh.py | test_parse_connection_string | 22 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import signal
from collections.abc import AsyncIterator, Awaitable, Callable, Iterator
from decimal import Decimal
from queue import Queue
from typing import TYPE_CHECKING, Any, cast
import pytest
from aiohttp import web
from bitcart import BTC # type: ignore
from bi... | 2 | assert | numeric_literal | tests/functional/test_functional.py | test_payouts | 411 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import contextlib
import os
import pathlib
import shlex
import subprocess
import time
from collections.abc import Callable
from dataclasses import dataclass
from datetime import UTC, datetime, timedelta
from decimal import Decimal
from typing import TYPE_CHECKING, Any,... | "" | assert | string_literal | tests/test_utils.py | test_get_template | 99 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import json as json_module
import os
from collections import defaultdict
from decimal import Decimal
from typing import TYPE_CHECKING, Any, cast
import pyotp
import pytest
import pytest_mock
from bitcart import BTC, LTC # type: ignore
from bitcart.errors import BaseE... | 1 | assert | numeric_literal | tests/test_views/test_views.py | test_wallets_balance | 136 | null | |
bitcart/bitcart | from __future__ import annotations
import asyncio
import signal
from collections.abc import AsyncIterator, Awaitable, Callable, Iterator
from decimal import Decimal
from queue import Queue
from typing import TYPE_CHECKING, Any, cast
import pytest
from aiohttp import web
from bitcart import BTC # type: ignore
from bi... | 0 | assert | numeric_literal | tests/functional/test_functional.py | test_payouts | 397 | null | |
run-llama/notebookllama | import pytest
from src.notebookllama.models import (
Notebook,
)
from src.notebookllama.verifying import ClaimVerification
from src.notebookllama.mindmap import MindMap, Node, Edge
from src.notebookllama.audio import MultiTurnConversation, ConversationTurn
from src.notebookllama.documents import ManagedDocument
fr... | "Test" | assert | string_literal | tests/test_models.py | test_managed_documents | 193 | null | |
run-llama/notebookllama | import pytest
import os
import socket
from dotenv import load_dotenv
from typing import List
from src.notebookllama.documents import DocumentManager, ManagedDocument
from sqlalchemy import text, Table
ENV = load_dotenv()
def is_port_open(host: str, port: int, timeout: float = 2.0) -> bool:
"""Check if a TCP port... | documents | assert | variable | tests/test_document_management.py | test_document_manager | 75 | null | |
run-llama/notebookllama | import pytest
import os
import pandas as pd
from pathlib import Path
from dotenv import load_dotenv
from unittest.mock import patch, MagicMock
from typing import Callable
from pydantic import ValidationError
from src.notebookllama.processing import (
process_file,
md_table_to_pd_dataframe,
rename_and_remov... | LLAMACLOUD_REGIONS | assert | variable | tests/test_utils.py | test_llamacloud_regions_constant | TestLlamaCloudRegionalUtils | 215 | null |
run-llama/notebookllama | import pytest
import os
import pandas as pd
from pathlib import Path
from dotenv import load_dotenv
from unittest.mock import patch, MagicMock
from typing import Callable
from pydantic import ValidationError
from src.notebookllama.processing import (
process_file,
md_table_to_pd_dataframe,
rename_and_remov... | mock_instance | assert | variable | tests/test_utils.py | test_create_llamacloud_client_valid | TestLlamaCloudRegionalUtils | 322 | null |
run-llama/notebookllama | import pytest
from elevenlabs import AsyncElevenLabs
from src.notebookllama.audio import (
PodcastGenerator,
MultiTurnConversation,
PodcastConfig,
AudioGenerationError,
ConversationGenerationError,
PodcastGeneratorError,
)
from llama_index.core.llms.structured_llm import StructuredLLM
from llam... | "Audio error" | assert | string_literal | tests/test_audio.py | test_custom_exceptions | 65 | null | |
run-llama/notebookllama | import pytest
import os
import pandas as pd
from pathlib import Path
from dotenv import load_dotenv
from unittest.mock import patch, MagicMock
from typing import Callable
from pydantic import ValidationError
from src.notebookllama.processing import (
process_file,
md_table_to_pd_dataframe,
rename_and_remov... | str(exc_info.value) | assert | func_call | tests/test_utils.py | test_get_llamacloud_base_url_invalid_region | TestLlamaCloudRegionalUtils | 270 | null |
run-llama/notebookllama | import pytest
from elevenlabs import AsyncElevenLabs
from src.notebookllama.audio import (
PodcastGenerator,
MultiTurnConversation,
PodcastConfig,
AudioGenerationError,
ConversationGenerationError,
PodcastGeneratorError,
)
from llama_index.core.llms.structured_llm import StructuredLLM
from llam... | prompt | assert | variable | tests/test_audio.py | test_build_conversation_prompt_basic | 84 | null | |
run-llama/notebookllama | import pytest
from src.notebookllama.models import (
Notebook,
)
from src.notebookllama.verifying import ClaimVerification
from src.notebookllama.mindmap import MindMap, Node, Edge
from src.notebookllama.audio import MultiTurnConversation, ConversationTurn
from src.notebookllama.documents import ManagedDocument
fr... | "guest" | assert | string_literal | tests/test_models.py | test_podcast_config_defaults | 257 | null | |
run-llama/notebookllama | import pytest
from src.notebookllama.models import (
Notebook,
)
from src.notebookllama.verifying import ClaimVerification
from src.notebookllama.mindmap import MindMap, Node, Edge
from src.notebookllama.audio import MultiTurnConversation, ConversationTurn
from src.notebookllama.documents import ManagedDocument
fr... | "general" | assert | string_literal | tests/test_models.py | test_podcast_config_defaults | 254 | null | |
run-llama/notebookllama | import pytest
import json
from pydantic import ValidationError
from src.notebookllama.workflow import (
NotebookLMWorkflow,
MindMapCreationEvent,
NotebookOutputEvent,
)
from src.notebookllama.models import Notebook
from workflows import Workflow
def notebook_to_process() -> Notebook:
return Notebook(
... | notebook_to_process.model_dump() | assert | func_call | tests/test_workflow.py | test_mind_map_event_ser | 65 | null | |
run-llama/notebookllama | import pytest
from src.notebookllama.models import (
Notebook,
)
from src.notebookllama.verifying import ClaimVerification
from src.notebookllama.mindmap import MindMap, Node, Edge
from src.notebookllama.audio import MultiTurnConversation, ConversationTurn
from src.notebookllama.documents import ManagedDocument
fr... | "256k" | assert | string_literal | tests/test_models.py | test_audio_quality_custom_values | 243 | null | |
run-llama/notebookllama | import pytest
from elevenlabs import AsyncElevenLabs
from src.notebookllama.audio import (
PodcastGenerator,
MultiTurnConversation,
PodcastConfig,
AudioGenerationError,
ConversationGenerationError,
PodcastGeneratorError,
)
from llama_index.core.llms.structured_llm import StructuredLLM
from llam... | "Base error" | assert | string_literal | tests/test_audio.py | test_custom_exceptions | 62 | null | |
run-llama/notebookllama | import pytest
import os
import pandas as pd
from pathlib import Path
from dotenv import load_dotenv
from unittest.mock import patch, MagicMock
from typing import Callable
from pydantic import ValidationError
from src.notebookllama.processing import (
process_file,
md_table_to_pd_dataframe,
rename_and_remov... | None | assert | none_literal | tests/test_utils.py | test_mind_map_creation | 151 | null | |
run-llama/notebookllama | import socket
import pytest
import pandas as pd
import os
from dotenv import load_dotenv
from src.notebookllama.instrumentation import OtelTracesSqlEngine
from sqlalchemy import text
ENV = load_dotenv()
def is_port_open(host: str, port: int, timeout: float = 2.0) -> bool:
"""Check if a TCP port is open on a give... | 2 | assert | numeric_literal | tests/test_sql_engine.py | test_engine | 70 | null | |
run-llama/notebookllama | import pytest
import os
import socket
from dotenv import load_dotenv
from typing import List
from src.notebookllama.documents import DocumentManager, ManagedDocument
from sqlalchemy import text, Table
ENV = load_dotenv()
def is_port_open(host: str, port: int, timeout: float = 2.0) -> bool:
"""Check if a TCP port... | [doc.document_name for doc in documents] | assert | collection | tests/test_document_management.py | test_document_manager | 73 | null | |
run-llama/notebookllama | import pytest
from src.notebookllama.models import (
Notebook,
)
from src.notebookllama.verifying import ClaimVerification
from src.notebookllama.mindmap import MindMap, Node, Edge
from src.notebookllama.audio import MultiTurnConversation, ConversationTurn
from src.notebookllama.documents import ManagedDocument
fr... | "A" | assert | string_literal | tests/test_models.py | test_mind_map | 93 | null | |
run-llama/notebookllama | import pytest
from src.notebookllama.models import (
Notebook,
)
from src.notebookllama.verifying import ClaimVerification
from src.notebookllama.mindmap import MindMap, Node, Edge
from src.notebookllama.audio import MultiTurnConversation, ConversationTurn
from src.notebookllama.documents import ManagedDocument
fr... | "This" | assert | string_literal | tests/test_models.py | test_notebook | 40 | null | |
run-llama/notebookllama | import pytest
import json
from pydantic import ValidationError
from src.notebookllama.workflow import (
NotebookLMWorkflow,
MindMapCreationEvent,
NotebookOutputEvent,
)
from src.notebookllama.models import Notebook
from workflows import Workflow
def notebook_to_process() -> Notebook:
return Notebook(
... | [ "_done", "extract_file_data", "generate_mind_map", ] | assert | collection | tests/test_workflow.py | test_init | 46 | null | |
run-llama/notebookllama | import pytest
import os
import pandas as pd
from pathlib import Path
from dotenv import load_dotenv
from unittest.mock import patch, MagicMock
from typing import Callable
from pydantic import ValidationError
from src.notebookllama.processing import (
process_file,
md_table_to_pd_dataframe,
rename_and_remov... | expected | assert | variable | tests/test_utils.py | test_get_llamacloud_config_valid | TestLlamaCloudRegionalUtils | 278 | null |
run-llama/notebookllama | import pytest
from src.notebookllama.models import (
Notebook,
)
from src.notebookllama.verifying import ClaimVerification
from src.notebookllama.mindmap import MindMap, Node, Edge
from src.notebookllama.audio import MultiTurnConversation, ConversationTurn
from src.notebookllama.documents import ManagedDocument
fr... | focus_topics | assert | variable | tests/test_models.py | test_podcast_config_custom_values | 279 | null | |
run-llama/notebookllama | import pytest
import json
from pydantic import ValidationError
from src.notebookllama.workflow import (
NotebookLMWorkflow,
MindMapCreationEvent,
NotebookOutputEvent,
)
from src.notebookllama.models import Notebook
from workflows import Workflow
def notebook_to_process() -> Notebook:
return Notebook(
... | model.model_dump() | assert | func_call | tests/test_workflow.py | test_mind_map_event_ser | 83 | null | |
run-llama/notebookllama | import pytest
import json
from pydantic import ValidationError
from src.notebookllama.workflow import (
NotebookLMWorkflow,
MindMapCreationEvent,
NotebookOutputEvent,
)
from src.notebookllama.models import Notebook
from workflows import Workflow
def notebook_to_process() -> Notebook:
return Notebook(
... | "map.html" | assert | string_literal | tests/test_workflow.py | test_mind_map_event_ser | 82 | null | |
run-llama/notebookllama | import pytest
import json
from pydantic import ValidationError
from src.notebookllama.workflow import (
NotebookLMWorkflow,
MindMapCreationEvent,
NotebookOutputEvent,
)
from src.notebookllama.models import Notebook
from workflows import Workflow
def notebook_to_process() -> Notebook:
return Notebook(
... | "Hello" | assert | string_literal | tests/test_workflow.py | test_mind_map_event_ser | 64 | null | |
run-llama/notebookllama | import pytest
from src.notebookllama.models import (
Notebook,
)
from src.notebookllama.verifying import ClaimVerification
from src.notebookllama.mindmap import MindMap, Node, Edge
from src.notebookllama.audio import MultiTurnConversation, ConversationTurn
from src.notebookllama.documents import ManagedDocument
fr... | "expert" | assert | string_literal | tests/test_models.py | test_podcast_config_custom_values | 280 | null | |
run-llama/notebookllama | import socket
import pytest
import pandas as pd
import os
from dotenv import load_dotenv
from src.notebookllama.instrumentation import OtelTracesSqlEngine
from sqlalchemy import text
ENV = load_dotenv()
def is_port_open(host: str, port: int, timeout: float = 2.0) -> bool:
"""Check if a TCP port is open on a give... | 1 | assert | numeric_literal | tests/test_sql_engine.py | test_engine | 65 | null | |
run-llama/notebookllama | import pytest
from src.notebookllama.models import (
Notebook,
)
from src.notebookllama.verifying import ClaimVerification
from src.notebookllama.mindmap import MindMap, Node, Edge
from src.notebookllama.audio import MultiTurnConversation, ConversationTurn
from src.notebookllama.documents import ManagedDocument
fr... | "Madrid" | assert | string_literal | tests/test_models.py | test_notebook | 39 | null | |
run-llama/notebookllama | import socket
import pytest
import pandas as pd
import os
from dotenv import load_dotenv
from src.notebookllama.instrumentation import OtelTracesSqlEngine
from sqlalchemy import text
ENV = load_dotenv()
def is_port_open(host: str, port: int, timeout: float = 2.0) -> bool:
"""Check if a TCP port is open on a give... | 500 | assert | numeric_literal | tests/test_sql_engine.py | test_engine | 68 | null | |
run-llama/notebookllama | import pytest
from src.notebookllama.models import (
Notebook,
)
from src.notebookllama.verifying import ClaimVerification
from src.notebookllama.mindmap import MindMap, Node, Edge
from src.notebookllama.audio import MultiTurnConversation, ConversationTurn
from src.notebookllama.documents import ManagedDocument
fr... | "B" | assert | string_literal | tests/test_models.py | test_mind_map | 96 | null | |
run-llama/notebookllama | import pytest
from src.notebookllama.models import (
Notebook,
)
from src.notebookllama.verifying import ClaimVerification
from src.notebookllama.mindmap import MindMap, Node, Edge
from src.notebookllama.audio import MultiTurnConversation, ConversationTurn
from src.notebookllama.documents import ManagedDocument
fr... | "320k" | assert | string_literal | tests/test_models.py | test_audio_quality_defaults | 235 | null | |
run-llama/notebookllama | import pytest
import os
import pandas as pd
from pathlib import Path
from dotenv import load_dotenv
from unittest.mock import patch, MagicMock
from typing import Callable
from pydantic import ValidationError
from src.notebookllama.processing import (
process_file,
md_table_to_pd_dataframe,
rename_and_remov... | 2 | assert | numeric_literal | tests/test_utils.py | test_table_to_dataframe | 181 | null | |
invoice-x/invoice2data | import os
import shutil
import unittest
from pathlib import Path
from typing import Generator
import pytest
from invoice2data.extract.invoice_template import InvoiceTemplate
from invoice2data.extract.loader import ordered_load
from invoice2data.extract.loader import read_templates
def templatedirectory() -> Generato... | ["Exclude_this"] | assert | collection | tests/test_loader.py | test_template_with_exclude_keyword_is_not_list | 137 | null | |
invoice-x/invoice2data | import os
import shutil
import unittest
from pathlib import Path
from typing import Generator
import pytest
from invoice2data.extract.invoice_template import InvoiceTemplate
from invoice2data.extract.loader import ordered_load
from invoice2data.extract.loader import read_templates
def templatedirectory() -> Generato... | [] | assert | collection | tests/test_loader.py | test_template_with_missing_keywords_is_not_loaded | 99 | null | |
invoice-x/invoice2data | import csv
import datetime
import json
import os
import shutil
import unittest
from typing import Any
from typing import Dict
from xml.dom import minidom
from invoice2data.__main__ import main # Import main only
from invoice2data.extract.loader import read_templates
from .common import exclude_template
from .common ... | 0) | self.assertEqual | numeric_literal | tests/test_cli.py | test_input | TestCLI | 53 | null |
invoice-x/invoice2data | import datetime
import json
import os
import unittest
from pathlib import Path
from typing import Union
from invoice2data.__main__ import extract_data
from invoice2data.extract.loader import read_templates
class TestExtraction(unittest.TestCase):
def setUp(self) -> None:
self.templates = read_templates()
... | res == ref_json) | self.assertTrue | complex_expr | tests/test_extraction.py | test_custom_invoices | TestExtraction | 65 | null |
invoice-x/invoice2data | import os
import shutil
import unittest
from pathlib import Path
from typing import Generator
import pytest
from invoice2data.extract.invoice_template import InvoiceTemplate
from invoice2data.extract.loader import ordered_load
from invoice2data.extract.loader import read_templates
def templatedirectory() -> Generato... | 2 | assert | numeric_literal | tests/test_loader.py | test_templates_stream_loader | 46 | null | |
invoice-x/invoice2data | import os
import shutil
import unittest
from pathlib import Path
from typing import Generator
import pytest
from invoice2data.extract.invoice_template import InvoiceTemplate
from invoice2data.extract.loader import ordered_load
from invoice2data.extract.loader import read_templates
def templatedirectory() -> Generato... | qty_templ_files + 2 | assert | complex_expr | tests/test_loader.py | test_default_templates_and_stream_loaded | 87 | null | |
invoice-x/invoice2data | import os
import shutil
import unittest
from pathlib import Path
from typing import Generator
import pytest
from invoice2data.extract.invoice_template import InvoiceTemplate
from invoice2data.extract.loader import ordered_load
from invoice2data.extract.loader import read_templates
def templatedirectory() -> Generato... | qty_templ_files | assert | variable | tests/test_loader.py | test_default_templates_are_loaded | 32 | null | |
invoice-x/invoice2data | import os
import unittest
from io import StringIO # noqa: F401
from typing import Any
from typing import Dict
from typing import List
from typing import Union
from unittest import mock
from invoice2data.__main__ import extract_data
from invoice2data.input import ocrmypdf
from invoice2data.input import pdfminer_wrappe... | os.path.exists(file_path)) | self.assertTrue | func_call | tests/test_lib.py | test_output_json | TestLIB | 85 | null |
invoice-x/invoice2data | import os
import unittest
from io import StringIO # noqa: F401
from typing import Any
from typing import Dict
from typing import List
from typing import Union
from unittest import mock
from invoice2data.__main__ import extract_data
from invoice2data.input import ocrmypdf
from invoice2data.input import pdfminer_wrappe... | type(res) is dict) | self.assertTrue | func_call | tests/test_lib.py | test_extract_data_pdftotext | TestLIB | 78 | null |
invoice-x/invoice2data | import os
import shutil
import unittest
from pathlib import Path
from typing import Generator
import pytest
from invoice2data.extract.invoice_template import InvoiceTemplate
from invoice2data.extract.loader import ordered_load
from invoice2data.extract.loader import read_templates
def templatedirectory() -> Generato... | ["Basic Test"] | assert | collection | tests/test_loader.py | test_template_with_keyword_is_not_list | 127 | null | |
invoice-x/invoice2data | import sys
from pathlib import Path
from unittest.mock import MagicMock
sys.path.insert(0, str(Path(__file__).parent.parent / "src"))
from invoice2data.input import gvision
def test_to_text_existing_result(mocker: "pytest_mock.MockerFixture") -> None: # type: ignore [name-defined] # noqa
# Mock the specific cla... | "cached text" | assert | string_literal | tests/test_gvision.py | test_to_text_existing_result | 89 | null | |
invoice-x/invoice2data | import os
import unittest
from io import StringIO # noqa: F401
from typing import Any
from typing import Dict
from typing import List
from typing import Union
from unittest import mock
from invoice2data.__main__ import extract_data
from invoice2data.input import ocrmypdf
from invoice2data.input import pdfminer_wrappe... | True) | self.assertTrue | bool_literal | tests/test_lib.py | test_tesseract_for_return | TestLIB | 133 | null |
invoice-x/invoice2data | import os
import shutil
import unittest
from pathlib import Path
from typing import Generator
import pytest
from invoice2data.extract.invoice_template import InvoiceTemplate
from invoice2data.extract.loader import ordered_load
from invoice2data.extract.loader import read_templates
def templatedirectory() -> Generato... | "thisnameisimportant.yml" | assert | string_literal | tests/test_loader.py | test_template_name_is_yaml_filename | 108 | null | |
invoice-x/invoice2data | import pytest
from click.testing import CliRunner
from invoice2data import __main__
def runner() -> CliRunner:
"""Fixture for invoking command-line interfaces."""
return CliRunner()
def test_main_succeeds(runner: CliRunner) -> None:
"""It exits with a status code of zero."""
result = runner.invoke(__... | 0 | assert | numeric_literal | tests/test_main.py | test_main_succeeds | 18 | null | |
invoice-x/invoice2data | import sys
from pathlib import Path
from unittest.mock import MagicMock
sys.path.insert(0, str(Path(__file__).parent.parent / "src"))
from invoice2data.input import gvision
def test_to_text(mocker: "pytest_mock.MockerFixture") -> None: # type: ignore [name-defined] # noqa
# Mock the specific classes within goog... | "test text" | assert | string_literal | tests/test_gvision.py | test_to_text | 55 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.