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
Chen-zexi/vllm-cli
import tempfile from pathlib import Path from unittest.mock import MagicMock, patch import pytest import yaml from vllm_cli.proxy.config import ProxyConfigManager from vllm_cli.proxy.manager import ProxyManager from vllm_cli.proxy.models import ModelConfig, ProxyConfig from vllm_cli.proxy.server_process import ProxyS...
[0]
assert
collection
tests/proxy/test_integration.py
test_load_proxy_config
TestProxyIntegration
82
null
Chen-zexi/vllm-cli
from unittest.mock import MagicMock, patch import pytest from vllm_cli.models.discovery import build_model_dict from vllm_cli.models.manager import ModelManager class TestOllamaGGUFCompatibility: def test_unsupported_architectures_documented(self): """Test that unsupported GGUF architectures are documen...
unsupported
assert
variable
tests/test_ollama_support.py
test_unsupported_architectures_documented
TestOllamaGGUFCompatibility
251
null
Chen-zexi/vllm-cli
import asyncio import socket import threading import time from typing import Any, Dict, Optional from unittest.mock import MagicMock, patch import httpx import pytest from fastapi import FastAPI from fastapi.responses import JSONResponse, StreamingResponse from vllm_cli.proxy.manager import ProxyManager from vllm_cli...
200
assert
numeric_literal
tests/proxy/test_e2e.py
test_e2e_streaming_response
TestProxyE2E
254
null
Chen-zexi/vllm-cli
import pytest from vllm_cli.cli.parser import create_parser class TestCLIParser: def test_serve_command_with_lora(self): """Test serve command with LoRA adapters.""" parser = create_parser() args = parser.parse_args( [ "serve", "test-model", ...
2
assert
numeric_literal
tests/test_cli_parser.py
test_serve_command_with_lora
TestCLIParser
65
null
Chen-zexi/vllm-cli
import pytest from vllm_cli.proxy.router import RequestRouter class TestRequestRouter: def router(self): """Create a RequestRouter instance.""" return RequestRouter() def test_add_backend(self, router): """Test adding a backend.""" router.add_backend( "model1", ...
[0]
assert
collection
tests/proxy/test_router.py
test_add_backend
TestRequestRouter
29
null
Chen-zexi/vllm-cli
import json from pathlib import Path from unittest.mock import patch from vllm_cli.config.profiles import ProfileManager class TestProfileManager: def test_delete_nonexistent_profile(self, temp_config_dir): """Test deleting non-existent profile.""" manager = ProfileManager(temp_config_dir) ...
False
assert
bool_literal
tests/test_profiles.py
test_delete_nonexistent_profile
TestProfileManager
111
null
Chen-zexi/vllm-cli
from unittest.mock import MagicMock, patch import pytest from vllm_cli.models.discovery import build_model_dict from vllm_cli.models.manager import ModelManager class TestOllamaIntegration: @patch("vllm_cli.models.discovery.scan_for_models") def test_full_ollama_workflow(self, mock_scan): """Test co...
model_names
assert
variable
tests/test_ollama_support.py
test_full_ollama_workflow
TestOllamaIntegration
353
null
Chen-zexi/vllm-cli
import json from pathlib import Path from unittest.mock import patch from vllm_cli.config.profiles import ProfileManager class TestProfileManager: @patch("vllm_cli.config.profiles.ProfileManager._load_default_profiles") def test_load_default_profiles(self, mock_load): """Test loading default profiles...
mock_profiles
assert
variable
tests/test_profiles.py
test_load_default_profiles
TestProfileManager
32
null
Chen-zexi/vllm-cli
from unittest.mock import MagicMock, patch import pytest from vllm_cli.proxy.manager import ProxyManager from vllm_cli.proxy.models import ModelConfig class TestProxyManager: def manager(self, sample_proxy_config, mock_config_manager): """Create a ProxyManager instance with mocked dependencies.""" ...
2
assert
numeric_literal
tests/proxy/test_manager.py
test_start_all_models_no_wait
TestProxyManager
259
null
Chen-zexi/vllm-cli
from unittest.mock import AsyncMock, MagicMock, patch import pytest from fastapi.testclient import TestClient from vllm_cli.proxy.models import ProxyConfig from vllm_cli.proxy.registry import ( ModelEntry, ModelRegistry, ModelState, RegistrationStatus, ) from vllm_cli.proxy.server import ProxyServer ...
0
assert
numeric_literal
tests/proxy/test_server.py
test_request_counting
TestProxyServer
198
null
Chen-zexi/vllm-cli
import pytest from vllm_cli.proxy.router import RequestRouter class TestRequestRouter: def router(self): """Create a RequestRouter instance.""" return RequestRouter() def test_add_backend(self, router): """Test adding a backend.""" router.add_backend( "model1", ...
8001
assert
numeric_literal
tests/proxy/test_router.py
test_add_backend
TestRequestRouter
28
null
Chen-zexi/vllm-cli
from unittest.mock import Mock, patch import yaml from vllm_cli.config.manager import ConfigManager class TestConfigManager: @patch("vllm_cli.config.manager.Path.home") def test_get_last_config(self, mock_home, temp_config_dir): """Test getting last used configuration.""" mock_home.return_va...
2
assert
numeric_literal
tests/test_config_manager.py
test_get_last_config
TestConfigManager
104
null
Chen-zexi/vllm-cli
from unittest.mock import patch import pytest from vllm_cli.models.cache import ModelCache from vllm_cli.models.manager import ModelManager class TestOllamaCacheTTL: def test_cache_ttl_bypass_on_refresh(self): """Test that TTL is bypassed when refresh=True.""" cache = ModelCache(ttl_seconds=3600...
models
assert
variable
tests/test_ollama_integration_fixed.py
test_cache_ttl_bypass_on_refresh
TestOllamaCacheTTL
93
null
Chen-zexi/vllm-cli
import os import tempfile from pathlib import Path from unittest.mock import Mock, patch import yaml from vllm_cli.config.manager import ConfigManager from vllm_cli.server.manager import VLLMServer class TestThreeTierPriority: def test_universal_env_applied(self): """Universal environment variables are ...
"1"
assert
string_literal
tests/test_environment_variables.py
test_universal_env_applied
TestThreeTierPriority
213
null
Chen-zexi/vllm-cli
import pytest from vllm_cli.proxy.router import RequestRouter class TestRequestRouter: def router(self): """Create a RequestRouter instance.""" return RequestRouter() def test_add_multiple_backends(self, router): """Test adding multiple backends.""" router.add_backend("model1...
3
assert
numeric_literal
tests/proxy/test_router.py
test_add_multiple_backends
TestRequestRouter
37
null
Chen-zexi/vllm-cli
from unittest.mock import MagicMock, patch import pytest from vllm_cli.models.discovery import build_model_dict from vllm_cli.models.manager import ModelManager class TestOllamaDiscovery: @patch("vllm_cli.models.discovery.scan_for_models") def test_scan_includes_ollama_models(self, mock_scan): """Te...
2
assert
numeric_literal
tests/test_ollama_support.py
test_scan_includes_ollama_models
TestOllamaDiscovery
60
null
Chen-zexi/vllm-cli
import pytest from vllm_cli.cli.parser import create_parser class TestCLIParser: def test_version_flag(self): """Test version flag.""" parser = create_parser() with pytest.raises(SystemExit) as excinfo: parser.parse_args(["--version"]) # Version flag causes sys.exit(...
0
assert
numeric_literal
tests/test_cli_parser.py
test_version_flag
TestCLIParser
131
null
Chen-zexi/vllm-cli
from unittest.mock import MagicMock, patch import pytest from vllm_cli.models.discovery import build_model_dict from vllm_cli.models.manager import ModelManager class TestOllamaDiscovery: def test_build_model_dict_with_ollama(self): """Test building model dict for Ollama models.""" ollama_item =...
"ollama/qwen3:30b"
assert
string_literal
tests/test_ollama_support.py
test_build_model_dict_with_ollama
TestOllamaDiscovery
27
null
Chen-zexi/vllm-cli
import asyncio import socket import threading import time from typing import Any, Dict, Optional from unittest.mock import MagicMock, patch import httpx import pytest from fastapi import FastAPI from fastapi.responses import JSONResponse, StreamingResponse from vllm_cli.proxy.manager import ProxyManager from vllm_cli...
2
assert
numeric_literal
tests/proxy/test_e2e.py
test_e2e_full_model_lifecycle_with_registry
TestProxyE2E
457
null
Chen-zexi/vllm-cli
from datetime import datetime from unittest.mock import Mock, patch import pytest from vllm_cli.server import process from vllm_cli.server.manager import VLLMServer def clean_active_servers(): """Ensure _active_servers is clean before and after each test.""" # Save original state original = process._acti...
True
assert
bool_literal
tests/test_server_manager.py
test_stop_server
TestVLLMServer
109
null
Chen-zexi/vllm-cli
from unittest.mock import MagicMock, patch import pytest from vllm_cli.proxy.manager import ProxyManager from vllm_cli.proxy.models import ModelConfig class TestProxyManager: def manager(self, sample_proxy_config, mock_config_manager): """Create a ProxyManager instance with mocked dependencies.""" ...
4
assert
numeric_literal
tests/proxy/test_manager.py
test_build_vllm_config_multi_gpu
TestProxyManager
311
null
Chen-zexi/vllm-cli
import json from pathlib import Path from unittest.mock import patch from vllm_cli.config.profiles import ProfileManager class TestProfileManager: def test_get_profile_nonexistent(self, temp_config_dir): """Test getting non-existent profile.""" manager = ProfileManager(temp_config_dir) w...
None
assert
none_literal
tests/test_profiles.py
test_get_profile_nonexistent
TestProfileManager
138
null
Chen-zexi/vllm-cli
import pytest from vllm_cli.proxy.router import RequestRouter class TestRequestRouter: def router(self): """Create a RequestRouter instance.""" return RequestRouter() def test_simple_routing_scenario(self, router): """Test a simple routing scenario with multiple models.""" # ...
"http://localhost:8002"
assert
string_literal
tests/proxy/test_router.py
test_simple_routing_scenario
TestRequestRouter
133
null
Chen-zexi/vllm-cli
from unittest.mock import Mock, patch import yaml from vllm_cli.config.manager import ConfigManager class TestConfigManager: @patch("vllm_cli.config.manager.Path.home") def test_validate_config_invalid(self, mock_home, temp_config_dir): """Test validating an invalid configuration.""" mock_ho...
errors[0]
assert
complex_expr
tests/test_config_manager.py
test_validate_config_invalid
TestConfigManager
177
null
Chen-zexi/vllm-cli
import json from pathlib import Path from unittest.mock import patch from vllm_cli.config.profiles import ProfileManager class TestProfileManager: def test_get_all_profiles(self, temp_config_dir): """Test getting all available profiles.""" manager = ProfileManager(temp_config_dir) # Mock...
all_profiles
assert
variable
tests/test_profiles.py
test_get_all_profiles
TestProfileManager
160
null
Chen-zexi/vllm-cli
import time from vllm_cli.models.cache import ModelCache from vllm_cli.models.manager import ModelManager class TestModelCache: def test_cache_models_and_get(self): """Test caching and getting models.""" cache = ModelCache() test_models = [{"name": "model1"}, {"name": "model2"}] ...
test_models
assert
variable
tests/test_model_manager.py
test_cache_models_and_get
TestModelCache
30
null
Chen-zexi/vllm-cli
import json from pathlib import Path from unittest.mock import patch from vllm_cli.config.profiles import ProfileManager class TestProfileManager: def test_load_user_profiles_existing(self, temp_config_dir): """Test loading existing user profiles.""" profiles_file = temp_config_dir / "user_profil...
user_profiles
assert
variable
tests/test_profiles.py
test_load_user_profiles_existing
TestProfileManager
57
null
Chen-zexi/vllm-cli
import json from pathlib import Path from unittest.mock import patch from vllm_cli.config.profiles import ProfileManager class TestProfileManager: def test_save_user_profile(self, temp_config_dir): """Test saving a new user profile.""" manager = ProfileManager(temp_config_dir) profile_da...
True
assert
bool_literal
tests/test_profiles.py
test_save_user_profile
TestProfileManager
68
null
Chen-zexi/vllm-cli
import json import shutil import tempfile from pathlib import Path from unittest.mock import MagicMock, patch import pytest from vllm_cli.models.manager import ModelManager from vllm_cli.models.manifest import apply_manifest_to_models, load_manifest class TestCustomDirectoryIntegration: def temp_custom_dir(self...
manifest
assert
variable
tests/test_custom_directory_integration.py
test_manifest_loading
TestCustomDirectoryIntegration
169
null
Chen-zexi/vllm-cli
from datetime import datetime from unittest.mock import Mock, patch import pytest from vllm_cli.server import process from vllm_cli.server.manager import VLLMServer def clean_active_servers(): """Ensure _active_servers is clean before and after each test.""" # Save original state original = process._acti...
8000
assert
numeric_literal
tests/test_server_manager.py
test_init
TestVLLMServer
36
null
Chen-zexi/vllm-cli
from unittest.mock import Mock, patch import yaml from vllm_cli.config.manager import ConfigManager class TestConfigManager: @patch("vllm_cli.config.manager.Path.home") def test_get_model_directories(self, mock_home, temp_config_dir): """Test getting model directories.""" mock_home.return_va...
directories
assert
variable
tests/test_config_manager.py
test_get_model_directories
TestConfigManager
195
null
Chen-zexi/vllm-cli
import tempfile from pathlib import Path from unittest.mock import MagicMock, patch import pytest import yaml from vllm_cli.proxy.config import ProxyConfigManager from vllm_cli.proxy.manager import ProxyManager from vllm_cli.proxy.models import ModelConfig, ProxyConfig from vllm_cli.proxy.server_process import ProxyS...
3
assert
numeric_literal
tests/proxy/test_integration.py
test_gpu_assignment_integration
TestProxyIntegration
273
null
Chen-zexi/vllm-cli
import pytest from vllm_cli.cli.parser import create_parser class TestCLIParser: def test_stop_command_with_port(self): """Test stop command with port.""" parser = create_parser() args = parser.parse_args(["stop", "--port", "8000"]) assert args.command == "stop" assert a...
8000
assert
numeric_literal
tests/test_cli_parser.py
test_stop_command_with_port
TestCLIParser
113
null
Chen-zexi/vllm-cli
from datetime import datetime from unittest.mock import Mock, patch import pytest from vllm_cli.server import process from vllm_cli.server.manager import VLLMServer def clean_active_servers(): """Ensure _active_servers is clean before and after each test.""" # Save original state original = process._acti...
2
assert
numeric_literal
tests/test_server_manager.py
test_get_recent_logs
TestVLLMServer
151
null
Chen-zexi/vllm-cli
import os import tempfile from pathlib import Path from unittest.mock import Mock, patch import yaml from vllm_cli.config.manager import ConfigManager from vllm_cli.server.manager import VLLMServer class TestIntegration: def test_full_environment_stack(self): """Test complete environment stack with all ...
True
assert
bool_literal
tests/test_environment_variables.py
test_full_environment_stack
TestIntegration
882
null
Chen-zexi/vllm-cli
from unittest.mock import MagicMock, patch import pytest from vllm_cli.proxy.manager import ProxyManager from vllm_cli.proxy.models import ModelConfig class TestProxyManager: def manager(self, sample_proxy_config, mock_config_manager): """Create a ProxyManager instance with mocked dependencies.""" ...
1
assert
numeric_literal
tests/proxy/test_manager.py
test_start_all_models_no_wait_some_disabled
TestProxyManager
276
null
Chen-zexi/vllm-cli
import pytest from vllm_cli.cli.parser import create_parser class TestCLIParser: def test_serve_command_with_port(self): """Test serve command with custom port.""" parser = create_parser() args = parser.parse_args(["serve", "test-model", "--port", "9000"]) assert args.command == ...
9000
assert
numeric_literal
tests/test_cli_parser.py
test_serve_command_with_port
TestCLIParser
48
null
Chen-zexi/vllm-cli
from unittest.mock import AsyncMock, MagicMock, patch import pytest from fastapi.testclient import TestClient from vllm_cli.proxy.models import ProxyConfig from vllm_cli.proxy.registry import ( ModelEntry, ModelRegistry, ModelState, RegistrationStatus, ) from vllm_cli.proxy.server import ProxyServer ...
2
assert
numeric_literal
tests/proxy/test_server.py
test_list_models_with_backends
TestProxyServer
101
null
Chen-zexi/vllm-cli
import pytest from pydantic import ValidationError from vllm_cli.proxy.models import ModelConfig, ModelStatus, ProxyConfig, ProxyStatus class TestProxyStatus: def test_proxy_status_serialization(self): """Test ProxyStatus serialization to dict.""" model_status = ModelStatus( name="tes...
10
assert
numeric_literal
tests/proxy/test_models.py
test_proxy_status_serialization
TestProxyStatus
291
null
Chen-zexi/vllm-cli
from vllm_cli.validation.base import ValidationError, ValidationResult from vllm_cli.validation.registry import ValidationRegistry from vllm_cli.validation.types import ( BooleanValidator, ChoiceValidator, FloatValidator, IntegerValidator, StringValidator, ) class TestValidationBasics: def tes...
None
assert
none_literal
tests/test_validation_simple.py
test_validators_exist
TestValidationBasics
28
null
Chen-zexi/vllm-cli
import pytest from vllm_cli.proxy.router import RequestRouter class TestRequestRouter: def router(self): """Create a RequestRouter instance.""" return RequestRouter() def test_add_backend(self, router): """Test adding a backend.""" router.add_backend( "model1", ...
router.backends
assert
complex_expr
tests/proxy/test_router.py
test_add_backend
TestRequestRouter
26
null
Chen-zexi/vllm-cli
from unittest.mock import Mock, patch import yaml from vllm_cli.config.manager import ConfigManager class TestConfigManager: @patch("vllm_cli.config.manager.Path.home") def test_get_last_config(self, mock_home, temp_config_dir): """Test getting last used configuration.""" mock_home.return_va...
None
assert
none_literal
tests/test_config_manager.py
test_get_last_config
TestConfigManager
101
null
Chen-zexi/vllm-cli
from unittest.mock import Mock, patch import yaml from vllm_cli.config.manager import ConfigManager class TestConfigManager: @patch("vllm_cli.config.manager.Path.home") def test_save_config(self, mock_home, temp_config_dir): """Test saving configuration.""" mock_home.return_value = temp_conf...
9000
assert
numeric_literal
tests/test_config_manager.py
test_save_config
TestConfigManager
77
null
Chen-zexi/vllm-cli
from unittest.mock import MagicMock, patch import pytest from vllm_cli.proxy.manager import ProxyManager from vllm_cli.proxy.models import ModelConfig class TestProxyManager: def manager(self, sample_proxy_config, mock_config_manager): """Create a ProxyManager instance with mocked dependencies.""" ...
0
assert
numeric_literal
tests/proxy/test_manager.py
test_stop_proxy
TestProxyManager
114
null
Chen-zexi/vllm-cli
from datetime import datetime from unittest.mock import Mock, patch import pytest from vllm_cli.server import process from vllm_cli.server.manager import VLLMServer def clean_active_servers(): """Ensure _active_servers is clean before and after each test.""" # Save original state original = process._acti...
None
assert
none_literal
tests/test_server_manager.py
test_init
TestVLLMServer
37
null
redis/redis-om-python
import abc from typing import Optional import pytest import pytest_asyncio from redisvl.index import AsyncSearchIndex, SearchIndex from redisvl.schema import IndexSchema from aredis_om import Field, HashModel, JsonModel, Migrator, VectorFieldOptions from aredis_om.redisvl import get_redisvl_index, to_redisvl_schema ...
field_names
assert
variable
tests/test_redisvl_integration.py
test_to_redisvl_schema_json_model
103
null
redis/redis-om-python
import abc from enum import Enum, IntEnum from typing import Optional import pytest import pytest_asyncio from aredis_om import Field, HashModel, JsonModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models_for_bug_fixes(key_prefix, redis): """Fixture prov...
"Jane"
assert
string_literal
tests/test_bug_fixes.py
test_issue_254_optional_field_with_value
149
null
redis/redis-om-python
import abc import datetime import decimal from collections import namedtuple from typing import Optional import pytest import pytest_asyncio from aredis_om import HashModel, Migrator, NotFoundError, RedisModelError from tests._compat import ValidationError from .conftest import py_test_mark_asyncio today = datetime...
NotFoundError)
pytest.raises
variable
tests/test_oss_redis_features.py
test_not_found
93
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( EmbeddedJsonModel, Field, FindQuery, HashModel, Json...
["FT.SEARCH", model_name, "(@first_name:{*ew})", "LIMIT", 0, 1000]
assert
collection
tests/test_find_query.py
test_find_query_text_endswith
384
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from enum import Enum from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( Coordinates, EmbeddedJsonModel, Field,...
0
assert
numeric_literal
tests/test_json_model.py
test_schema_for_fields_does_not_modify_dict_during_iteration
1,713
null
redis/redis-om-python
import abc import datetime import decimal from collections import namedtuple from typing import Optional import pytest import pytest_asyncio from aredis_om import HashModel, Migrator, NotFoundError, RedisModelError from tests._compat import ValidationError from .conftest import py_test_mark_asyncio today = datetime...
3
assert
numeric_literal
tests/test_oss_redis_features.py
test_all_keys
87
null
redis/redis-om-python
import abc from enum import Enum, IntEnum from typing import Optional import pytest import pytest_asyncio from aredis_om import Field, HashModel, JsonModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models_for_bug_fixes(key_prefix, redis): """Fixture prov...
"Joe"
assert
string_literal
tests/test_bug_fixes.py
test_issue_254_optional_field_retrieval
131
null
redis/redis-om-python
import abc import datetime from collections import namedtuple from typing import Optional import pytest import pytest_asyncio from pydantic import field_validator from aredis_om import Field, HashModel, Migrator from tests._compat import EmailStr, ValidationError today = datetime.date.today() async def m(key_prefix...
value
assert
variable
tests/test_pydantic_integrations.py
test_validator_sets_value_on_init
68
null
redis/redis-om-python
import abc import datetime import decimal from collections import namedtuple from typing import Optional import pytest import pytest_asyncio from aredis_om import HashModel, Migrator, NotFoundError, RedisModelError from tests._compat import ValidationError from .conftest import py_test_mark_asyncio today = datetime...
member1
assert
variable
tests/test_oss_redis_features.py
test_saves_many
175
null
redis/redis-om-python
import abc from typing import Optional import pytest import pytest_asyncio from redisvl.index import AsyncSearchIndex, SearchIndex from redisvl.schema import IndexSchema from aredis_om import Field, HashModel, JsonModel, Migrator, VectorFieldOptions from aredis_om.redisvl import get_redisvl_index, to_redisvl_schema ...
"json"
assert
string_literal
tests/test_redisvl_integration.py
test_to_redisvl_schema_json_model
99
null
redis/redis-om-python
import abc import datetime import decimal from collections import namedtuple from typing import Optional import pytest import pytest_asyncio from aredis_om import HashModel, Migrator, NotFoundError, RedisModelError from tests._compat import ValidationError from .conftest import py_test_mark_asyncio today = datetime...
member
assert
variable
tests/test_oss_redis_features.py
test_saves_model_and_creates_pk
136
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from enum import Enum from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( Coordinates, EmbeddedJsonModel, Field,...
2
assert
numeric_literal
tests/test_json_model.py
test_delete_many_implicit_pipeline
391
null
redis/redis-om-python
import hashlib import os import tempfile from unittest.mock import AsyncMock, patch import pytest from aredis_om.model.migrations.schema import BaseSchemaMigration, SchemaMigrator from aredis_om.model.migrations.schema.legacy_migrator import ( schema_hash_key, schema_text_key, ) def get_worker_id(): """G...
hash2
assert
variable
tests/test_schema_migrator.py
test_rollback_multiple_operations
397
null
redis/redis-om-python
from datetime import datetime from enum import Enum from typing import List, Optional import pytest from aredis_om import ( EmbeddedJsonModel, Field, HashModel, JsonModel, Migrator, NotFoundError, ) from .conftest import py_test_mark_asyncio async def run_migrations(): """Run migrations ...
"Test Product"
assert
string_literal
tests/test_examples.py
test_product_jsonmodel_crud
192
null
redis/redis-om-python
import abc import pytest import pytest_asyncio from aredis_om import Field, HashModel, JsonModel, Migrator from aredis_om.model.model import SINGLE_VALUE_TAG_FIELD_SEPARATOR from redis_om import has_redisearch from .conftest import py_test_mark_asyncio class TestFieldSeparatorParameter: def test_field_accepts...
sep
assert
variable
tests/test_tag_separator.py
test_field_accepts_various_separators
TestFieldSeparatorParameter
46
null
redis/redis-om-python
import abc import struct from typing import Optional, Type import pytest import pytest_asyncio from aredis_om import Field, JsonModel, KNNExpression, Migrator, VectorFieldOptions from redis_om import has_redis_json from .conftest import py_test_mark_asyncio DIMENSIONS = 768 vector_field_options = VectorFieldOptio...
2
assert
numeric_literal
tests/test_knn_expression.py
test_or_expression_with_knn
190
null
redis/redis-om-python
import abc import asyncio import datetime import time from collections import namedtuple from unittest import mock import pytest import pytest_asyncio from aredis_om import Field, HashModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models(key_prefix, redis):...
1
assert
numeric_literal
tests/test_hash_field_expiration.py
test_expire_field_sets_ttl
109
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from enum import Enum from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( Coordinates, EmbeddedJsonModel, Field,...
30
assert
numeric_literal
tests/test_json_model.py
test_pagination
1,217
null
redis/redis-om-python
from datetime import datetime from enum import Enum from typing import List, Optional import pytest from aredis_om import ( EmbeddedJsonModel, Field, HashModel, JsonModel, Migrator, NotFoundError, ) from .conftest import py_test_mark_asyncio async def run_migrations(): """Run migrations ...
"Boston"
assert
string_literal
tests/test_examples.py
test_order_with_embedded_address
240
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( EmbeddedJsonModel, Field, FindQuery, HashModel, Json...
["FT.SEARCH", model_name, "@first_name:{Andrew}", "LIMIT", 0, 1000]
assert
collection
tests/test_find_query.py
test_find_query_eq
182
null
redis/redis-om-python
import abc from typing import Optional import pytest import pytest_asyncio from redisvl.index import AsyncSearchIndex, SearchIndex from redisvl.schema import IndexSchema from aredis_om import Field, HashModel, JsonModel, Migrator, VectorFieldOptions from aredis_om.redisvl import get_redisvl_index, to_redisvl_schema ...
Document.Meta.index_name
assert
complex_expr
tests/test_redisvl_integration.py
test_get_redisvl_index_async
144
null
redis/redis-om-python
from datetime import datetime from enum import Enum from typing import List, Optional import pytest from aredis_om import ( EmbeddedJsonModel, Field, HashModel, JsonModel, Migrator, NotFoundError, ) from .conftest import py_test_mark_asyncio async def run_migrations(): """Run migrations ...
"MA"
assert
string_literal
tests/test_examples.py
test_order_with_embedded_address
241
null
redis/redis-om-python
import abc import datetime import decimal from collections import namedtuple from typing import Optional import pytest import pytest_asyncio from aredis_om import HashModel, Migrator, NotFoundError, RedisModelError from tests._compat import ValidationError from .conftest import py_test_mark_asyncio today = datetime...
ValidationError)
pytest.raises
variable
tests/test_oss_redis_features.py
test_validates_required_fields
101
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( EmbeddedJsonModel, Field, FindQuery, HashModel, Json...
[ "FT.SEARCH", model_name, "(@age:[-inf (40]) (@first_name:{Andrew})", "LIMIT", 0, 1000, ]
assert
collection
tests/test_find_query.py
test_find_query_text_search_and
275
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( EmbeddedJsonModel, Field, FindQuery, HashModel, Json...
["FT.SEARCH", model_name, "-(@first_name:{Andrew})", "LIMIT", 0, 1000]
assert
collection
tests/test_find_query.py
test_find_query_ne
190
null
redis/redis-om-python
from datetime import datetime from enum import Enum from typing import List, Optional import pytest from aredis_om import ( EmbeddedJsonModel, Field, HashModel, JsonModel, Migrator, NotFoundError, ) from .conftest import py_test_mark_asyncio async def run_migrations(): """Run migrations ...
99.99
assert
numeric_literal
tests/test_examples.py
test_product_jsonmodel_crud
193
null
redis/redis-om-python
import abc import pytest import pytest_asyncio from aredis_om import Field, HashModel, JsonModel, Migrator from aredis_om.model.model import SINGLE_VALUE_TAG_FIELD_SEPARATOR from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def separator_models(key_prefix, redis): """Fixture ...
1
assert
numeric_literal
tests/test_tag_separator.py
test_hash_model_save_and_query_with_custom_separator
TestEndToEndWithCustomSeparator
145
null
redis/redis-om-python
import datetime import pytest from aredis_om import Field from aredis_om.model.model import HashModel, JsonModel from redis_om import has_redis_json from .conftest import py_test_mark_asyncio @py_test_mark_asyncio async def test_hash_model_datetime_conversion(redis): """Test datetime conversion in HashModel.""...
1
assert
numeric_literal
tests/test_datetime_fix.py
test_hash_model_datetime_conversion
69
null
redis/redis-om-python
import hashlib import os import tempfile from unittest.mock import AsyncMock, patch import pytest from aredis_om.model.migrations.schema import BaseSchemaMigration, SchemaMigrator from aredis_om.model.migrations.schema.legacy_migrator import ( schema_hash_key, schema_text_key, ) def get_worker_id(): """G...
False
assert
bool_literal
tests/test_schema_migrator.py
test_rollback_not_supported
428
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( EmbeddedJsonModel, Field, FindQuery, HashModel, Json...
[ "FT.SEARCH", model_name, "@age:[(0 +inf]", "LIMIT", 0, 1000, "SORTBY", "age", "desc", ]
assert
collection
tests/test_find_query.py
test_find_query_sort_desc
249
null
redis/redis-om-python
import hashlib import os import tempfile from unittest.mock import AsyncMock, patch import pytest from aredis_om.model.migrations.schema import BaseSchemaMigration, SchemaMigrator from aredis_om.model.migrations.schema.legacy_migrator import ( schema_hash_key, schema_text_key, ) def get_worker_id(): """G...
new_hash
assert
variable
tests/test_schema_migrator.py
test_rollback_dry_run
511
null
redis/redis-om-python
import abc import asyncio import datetime import time from collections import namedtuple from unittest import mock import pytest import pytest_asyncio from aredis_om import Field, HashModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models(key_prefix, redis):...
60
assert
numeric_literal
tests/test_hash_field_expiration.py
test_save_preserves_manually_set_ttl
303
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( Coordinates, Field, GeoFilter, HashModel, Migrator, ...
1
assert
numeric_literal
tests/test_hash_model.py
test_delete
572
null
redis/redis-om-python
import abc from enum import Enum, IntEnum from typing import Optional import pytest import pytest_asyncio from aredis_om import Field, HashModel, JsonModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models_for_bug_fixes(key_prefix, redis): """Fixture prov...
"Task 1"
assert
string_literal
tests/test_bug_fixes.py
test_issue_108_enum_int_in_query
107
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( Coordinates, Field, GeoFilter, HashModel, Migrator, ...
0
assert
numeric_literal
tests/test_hash_model.py
test_expire
591
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( Coordinates, Field, GeoFilter, HashModel, Migrator, ...
34
assert
numeric_literal
tests/test_hash_model.py
test_update_validation
935
null
redis/redis-om-python
import abc from enum import Enum, IntEnum from typing import Optional import pytest import pytest_asyncio from aredis_om import Field, HashModel, JsonModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models_for_bug_fixes(key_prefix, redis): """Fixture prov...
25
assert
numeric_literal
tests/test_bug_fixes.py
test_issue_254_optional_field_with_value
150
null
redis/redis-om-python
import hashlib import os import tempfile from unittest.mock import AsyncMock, patch import pytest from aredis_om.model.migrations.schema import BaseSchemaMigration, SchemaMigrator from aredis_om.model.migrations.schema.legacy_migrator import ( schema_hash_key, schema_text_key, ) def get_worker_id(): """G...
None
assert
none_literal
tests/test_schema_migrator.py
test_rollback_with_empty_previous_schema
295
null
redis/redis-om-python
import hashlib import os import tempfile from unittest.mock import AsyncMock, patch import pytest from aredis_om.model.migrations.schema import BaseSchemaMigration, SchemaMigrator from aredis_om.model.migrations.schema.legacy_migrator import ( schema_hash_key, schema_text_key, ) def get_worker_id(): """G...
0
assert
numeric_literal
tests/test_schema_migrator.py
test_create_and_status_empty
99
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( EmbeddedJsonModel, Field, FindQuery, HashModel, Json...
["FT.SEARCH", model_name, "@age:[38 +inf]", "LIMIT", 0, 1000]
assert
collection
tests/test_find_query.py
test_find_query_ge
222
null
redis/redis-om-python
import abc from enum import Enum, IntEnum from typing import Optional import pytest import pytest_asyncio from aredis_om import Field, HashModel, JsonModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models_for_bug_fixes(key_prefix, redis): """Fixture prov...
65.5
assert
numeric_literal
tests/test_bug_fixes.py
test_issue_254_optional_field_with_value
151
null
redis/redis-om-python
import hashlib import os import tempfile from unittest.mock import AsyncMock, patch import pytest from aredis_om.model.migrations.schema import BaseSchemaMigration, SchemaMigrator from aredis_om.model.migrations.schema.legacy_migrator import ( schema_hash_key, schema_text_key, ) def get_worker_id(): """G...
True
assert
bool_literal
tests/test_schema_migrator.py
test_rollback_successful_single_operation
244
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( EmbeddedJsonModel, Field, FindQuery, HashModel, Json...
["FT.SEARCH", model_name, in_str, "LIMIT", 0, 1000]
assert
collection
tests/test_find_query.py
test_find_query_in
162
null
redis/redis-om-python
import abc import dataclasses import datetime import decimal import uuid from collections import namedtuple from enum import Enum from typing import Dict, List, Optional, Set, Union from unittest import mock import pytest import pytest_asyncio from aredis_om import ( Coordinates, EmbeddedJsonModel, Field,...
[]
assert
collection
tests/test_json_model.py
test_access_result_by_index_cached
429
null
redis/redis-om-python
import abc import asyncio import datetime import time from collections import namedtuple from unittest import mock import pytest import pytest_asyncio from aredis_om import Field, HashModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models(key_prefix, redis):...
ttl
assert
variable
tests/test_hash_field_expiration.py
test_save_applies_field_expiration
88
null
redis/redis-om-python
import hashlib import os import tempfile from unittest.mock import AsyncMock, patch import pytest from aredis_om.model.migrations.schema import BaseSchemaMigration, SchemaMigrator from aredis_om.model.migrations.schema.legacy_migrator import ( schema_hash_key, schema_text_key, ) def get_worker_id(): """G...
new_schema
assert
variable
tests/test_schema_migrator.py
test_rollback_dry_run
512
null
redis/redis-om-python
import abc from enum import Enum, IntEnum from typing import Optional import pytest import pytest_asyncio from aredis_om import Field, HashModel, JsonModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models_for_bug_fixes(key_prefix, redis): """Fixture prov...
"Task 2"
assert
string_literal
tests/test_bug_fixes.py
test_issue_108_enum_int_in_query
102
null
redis/redis-om-python
import abc from enum import Enum, IntEnum from typing import Optional import pytest import pytest_asyncio from aredis_om import Field, HashModel, JsonModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models_for_bug_fixes(key_prefix, redis): """Fixture prov...
"Solo"
assert
string_literal
tests/test_bug_fixes.py
test_issue_499_in_operator_single_value
198
null
redis/redis-om-python
from datetime import datetime from enum import Enum from typing import List, Optional import pytest from aredis_om import ( EmbeddedJsonModel, Field, HashModel, JsonModel, Migrator, NotFoundError, ) from .conftest import py_test_mark_asyncio async def run_migrations(): """Run migrations ...
1
assert
numeric_literal
tests/test_examples.py
test_user_hashmodel_queries
144
null
redis/redis-om-python
import abc from enum import Enum, IntEnum from typing import Optional import pytest import pytest_asyncio from aredis_om import Field, HashModel, JsonModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models_for_bug_fixes(key_prefix, redis): """Fixture prov...
3
assert
numeric_literal
tests/test_bug_fixes.py
test_issue_499_in_operator_numeric_fields
183
null
redis/redis-om-python
import abc import datetime import decimal from collections import namedtuple from typing import Optional import pytest import pytest_asyncio from aredis_om import HashModel, Migrator, NotFoundError, RedisModelError from tests._compat import ValidationError from .conftest import py_test_mark_asyncio today = datetime...
"Smith"
assert
string_literal
tests/test_oss_redis_features.py
test_updates_a_model
184
null
redis/redis-om-python
import abc import asyncio import datetime import time from collections import namedtuple from unittest import mock import pytest import pytest_asyncio from aredis_om import Field, HashModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models(key_prefix, redis):...
None
assert
none_literal
tests/test_hash_field_expiration.py
test_field_with_expire_parameter
68
null
redis/redis-om-python
import abc from enum import Enum, IntEnum from typing import Optional import pytest import pytest_asyncio from aredis_om import Field, HashModel, JsonModel, Migrator from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def models_for_bug_fixes(key_prefix, redis): """Fixture prov...
1
assert
numeric_literal
tests/test_bug_fixes.py
test_issue_108_enum_int_in_query
101
null
redis/redis-om-python
import abc import pytest import pytest_asyncio from aredis_om import Field, HashModel, JsonModel, Migrator from aredis_om.model.model import SINGLE_VALUE_TAG_FIELD_SEPARATOR from redis_om import has_redisearch from .conftest import py_test_mark_asyncio async def separator_models(key_prefix, redis): """Fixture ...
schema
assert
variable
tests/test_tag_separator.py
test_hash_model_schema_uses_custom_separator
TestSchemaGeneration
99
null
redis/redis-om-python
from datetime import datetime from enum import Enum from typing import List, Optional import pytest from aredis_om import ( EmbeddedJsonModel, Field, HashModel, JsonModel, Migrator, NotFoundError, ) from .conftest import py_test_mark_asyncio async def run_migrations(): """Run migrations ...
"testuser"
assert
string_literal
tests/test_examples.py
test_user_hashmodel_crud
124
null