repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_cli_parser.py
test_models_command_with_details
assert
bool_literal
14
import pytest from vllm_cli.cli.parser import create_parser class TestCLIParser: def test_models_command_with_details(self): """Test models command with details flag.""" parser = create_parser() args = parser.parse_args(["models", "--details"]) assert args.command == "models" ...
True
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_cli_parser.py
test_stop_command_with_port
assert
numeric_literal
14
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_cli_parser.py
test_info_command
assert
string_literal
13
import pytest from vllm_cli.cli.parser import create_parser class TestCLIParser: def test_info_command(self): """Test info command.""" parser = create_parser() args = parser.parse_args(["info"]) assert args.command ==
"info"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_cli_parser.py
test_stop_command_with_port
assert
string_literal
13
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"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_cli_parser.py
test_serve_with_shortcut
assert
string_literal
21
import pytest from vllm_cli.cli.parser import create_parser class TestCLIParser: def test_serve_with_shortcut(self): """Test serve command with shortcut option.""" parser = create_parser() # Test with shortcut only (no model needed) args = parser.parse_args(["serve", "--shortcut"...
"gpt2"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_cli_parser.py
test_serve_command_basic
assert
string_literal
13
import pytest from vllm_cli.cli.parser import create_parser class TestCLIParser: def test_serve_command_basic(self): """Test basic serve command.""" parser = create_parser() args = parser.parse_args(["serve", "meta-llama/Llama-2-7b"]) assert args.command ==
"serve"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_get_last_config
assert
numeric_literal
35
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_validate_config_valid
assert
numeric_literal
29
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_valid(self, mock_home, temp_config_dir): """Test validating a valid configuration.""" mock_home.re...
0
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_validate_config_invalid
assert
numeric_literal
31
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...
1
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_load_existing_config
assert
numeric_literal
31
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_load_existing_config(self, mock_home, temp_config_dir): """Test loading existing configuration file.""" mock_home....
8000
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_save_config
assert
numeric_literal
27
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_get_last_config
assert
none_literal
32
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_get_last_config
assert
numeric_literal
34
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...
8080
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_validate_config_invalid
assert
complex_expr
32
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]
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_get_last_config
assert
string_literal
33
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...
"llama-7b"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_save_last_config
assert
string_literal
25
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_last_config(self, mock_home, temp_config_dir): """Test saving last used configuration.""" mock_home.return_va...
"new-model"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_get_model_directories
assert
variable
26
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_init_creates_config_dir
assert
variable
19
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_init_creates_config_dir(self, mock_home, temp_config_dir): """Test that ConfigManager creates config directory on init."""...
expected_dir
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_load_existing_config
assert
string_literal
30
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_load_existing_config(self, mock_home, temp_config_dir): """Test loading existing configuration file.""" mock_home....
"test-model"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_config_manager.py
test_save_config
assert
string_literal
26
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...
"test_value"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_custom_directory_integration.py
test_discover_custom_models
assert
numeric_literal
67
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...
2
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_custom_directory_integration.py
test_end_to_end_custom_model_serving
assert
numeric_literal
89
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...
1
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_custom_directory_integration.py
test_add_custom_directory
assert
bool_literal
64
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...
True
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_custom_directory_integration.py
test_manifest_loading
assert
none_literal
59
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...
None
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_custom_directory_integration.py
test_custom_model_with_manifest_metadata
assert
string_literal
115
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...
"MyOrg"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_custom_directory_integration.py
test_custom_model_selection
assert
string_literal
83
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...
"local"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_custom_directory_integration.py
test_manifest_loading
assert
variable
60
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_environment_variables.py
test_tensor_parallel_adjustment_with_device
assert
numeric_literal
50
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 TestErrorHandling: def test_tensor_parallel_adjustment_with_device(self): """Tensor parallel size is...
2
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_environment_variables.py
test_universal_env_applied
assert
string_literal
49
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"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_environment_variables.py
test_complete_override_chain
assert
string_literal
64
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 TestEnvironmentMerging: def test_complete_override_chain(self): """Test complete override chain with...
"7"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_environment_variables.py
test_subprocess_env_isolation
assert
none_literal
48
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 TestEnvironmentIsolation: def test_subprocess_env_isolation(self): """Verify subprocess gets isolate...
None
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_environment_variables.py
test_full_environment_stack
assert
bool_literal
67
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_model_manager.py
test_init
assert
none_literal
12
import time from vllm_cli.models.cache import ModelCache from vllm_cli.models.manager import ModelManager class TestModelManager: def test_init(self): """Test ModelManager initialization.""" manager = ModelManager() assert manager.cache is not
None
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_model_manager.py
test_cache_models_and_get
assert
variable
17
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_integration_fixed.py
test_cache_stats_after_refresh
assert
numeric_literal
17
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_stats_after_refresh(self): """Test that cache statistics are updated after refresh.""" cache = ModelCache() ...
0
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_integration_fixed.py
test_cache_stats_after_refresh
assert
numeric_literal
25
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_stats_after_refresh(self): """Test that cache statistics are updated after refresh.""" cache = ModelCache() ...
1
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_integration_fixed.py
test_list_models_includes_ollama
assert
numeric_literal
29
from unittest.mock import patch import pytest from vllm_cli.models.cache import ModelCache from vllm_cli.models.manager import ModelManager class TestOllamaModelManagerIntegration: def test_list_models_includes_ollama(self): """Test that list_available_models includes Ollama models.""" manager =...
2
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_integration_fixed.py
test_missing_directories_handling
assert
collection
22
from unittest.mock import patch import pytest from vllm_cli.models.cache import ModelCache from vllm_cli.models.manager import ModelManager class TestOllamaErrorHandling: def test_missing_directories_handling(self): """Test handling of missing Ollama directories.""" manager = ModelManager() ...
[]
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_integration_fixed.py
test_refresh_cache_method
assert
none_literal
18
from unittest.mock import patch import pytest from vllm_cli.models.cache import ModelCache from vllm_cli.models.manager import ModelManager class TestOllamaCacheRefresh: def test_refresh_cache_method(self): """Test the refresh_cache method refreshes cache properly.""" manager = ModelManager() ...
None
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_integration_fixed.py
test_cache_ttl_bypass_on_refresh
assert
variable
20
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_integration_fixed.py
test_cache_ttl_bypass_on_refresh
assert
variable
33
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...
new_models
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_integration_fixed.py
test_cache_refresh_clears_and_refetches
assert
variable
20
from unittest.mock import patch import pytest from vllm_cli.models.cache import ModelCache from vllm_cli.models.manager import ModelManager class TestOllamaCacheRefresh: def test_cache_refresh_clears_and_refetches(self): """Test that cache refresh clears old data and fetches new.""" manager = Mo...
initial_models
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_integration_fixed.py
test_full_ollama_workflow
assert
string_literal
27
from unittest.mock import patch import pytest from vllm_cli.models.cache import ModelCache from vllm_cli.models.manager import ModelManager class TestOllamaWorkflow: def test_full_ollama_workflow(self): """Test complete workflow from discovery to listing.""" from vllm_cli.models.discovery import...
"ollama_model"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_integration_fixed.py
test_full_ollama_workflow
assert
string_literal
26
from unittest.mock import patch import pytest from vllm_cli.models.cache import ModelCache from vllm_cli.models.manager import ModelManager class TestOllamaWorkflow: def test_full_ollama_workflow(self): """Test complete workflow from discovery to listing.""" from vllm_cli.models.discovery import...
"ollama/phi3:mini"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_integration_fixed.py
test_cache_stats_tracking
assert
complex_expr
28
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_stats_tracking(self): """Test that cache statistics are properly tracked internally.""" cache = ModelCache() ...
initial_stats["hits"]
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_support.py
test_scan_includes_ollama_models
assert
numeric_literal
33
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_support.py
test_scan_includes_ollama_models
assert
numeric_literal
35
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...
1
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_support.py
test_build_model_dict_with_ollama
assert
collection
31
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 =...
{}
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_support.py
test_select_ollama_model_format
assert
bool_literal
75
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 TestOllamaModelSelection: def test_select_ollama_model_format(self): """Test Ollama model selection returns correct format for serving.""...
True
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_support.py
test_select_ollama_model_format
assert
string_literal
74
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 TestOllamaModelSelection: def test_select_ollama_model_format(self): """Test Ollama model selection returns correct format for serving.""...
"gguf"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_support.py
test_select_ollama_model_format
assert
string_literal
72
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 TestOllamaModelSelection: def test_select_ollama_model_format(self): """Test Ollama model selection returns correct format for serving.""...
"qwen3:30b"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_support.py
test_full_ollama_workflow
assert
variable
45
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_support.py
test_unsupported_architectures_documented
assert
variable
24
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_support.py
test_ollama_model_dict_structure
assert
variable
23
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 TestOllamaModelMetadata: def test_ollama_model_dict_structure(self): """Test the structure of Ollama model dictionary.""" ollama_...
ollama_model
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_support.py
test_build_model_dict_with_ollama
assert
string_literal
28
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_model"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_ollama_support.py
test_build_model_dict_with_ollama
assert
string_literal
24
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"
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_profiles.py
test_get_all_profiles
assert
numeric_literal
29
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...
4
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_profiles.py
test_load_user_profiles_no_file
assert
collection
15
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_no_file(self, temp_config_dir): """Test loading user profiles when file doesn't exist.""" manager = ProfileManager(temp_co...
{}
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_profiles.py
test_save_user_profile
assert
bool_literal
17
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_profiles.py
test_get_profile_nonexistent
assert
none_literal
16
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_profiles.py
test_delete_nonexistent_profile
assert
bool_literal
16
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_profiles.py
test_load_default_profiles
assert
variable
23
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...
profiles
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_profiles.py
test_save_user_profile
assert
variable
21
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...
profile_data
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_profiles.py
test_update_existing_profile
assert
variable
23
import json from pathlib import Path from unittest.mock import patch from vllm_cli.config.profiles import ProfileManager class TestProfileManager: def test_update_existing_profile(self, temp_config_dir): """Test updating an existing user profile.""" manager = ProfileManager(temp_config_dir) ...
updated_data
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_profiles.py
test_get_all_profiles
assert
variable
30
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_profiles.py
test_load_default_profiles
assert
variable
22
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_profiles.py
test_load_user_profiles_existing
assert
variable
24
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_server_manager.py
test_get_recent_logs
assert
numeric_literal
41
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_server_manager.py
test_init
assert
numeric_literal
31
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_server_manager.py
test_init
assert
none_literal
32
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_server_manager.py
test_stop_server
assert
bool_literal
41
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_server_manager.py
test_init
assert
bool_literal
33
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...
False
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_server_manager.py
test_get_status
assert
numeric_literal
39
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...
12345
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_server_manager.py
test_get_status
assert
variable
42
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...
status
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_server_manager.py
test_get_recent_logs
assert
complex_expr
42
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...
logs[0]
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_server_manager.py
test_get_recent_logs
assert
complex_expr
43
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...
logs[1]
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_server_manager.py
test_build_command
assert
variable
33
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...
command_str
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_validation_simple.py
test_validation_result
assert
bool_literal
17
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...
True
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_validation_simple.py
test_validators_exist
assert
none_literal
16
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
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Chen-zexi/vllm-cli
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
train
train
tests/test_validation_simple.py
test_validation_result
assert
bool_literal
21
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...
False
1b0c47ca5801177b2d3e6401d0e006b348b31df9
7
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_cookie_parsing.py
test_parse_cookies_empty_dict
assert
numeric_literal
17
import pytest from xhshow import Xhshow from xhshow.core.common_sign import XsCommonSigner class TestCookieParsing: def setup_method(self): self.client = Xhshow() def test_parse_cookies_empty_dict(self): """测试空字典解析""" result = self.client._parse_cookies({}) assert isinstance...
0
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_cookie_parsing.py
test_cookie_string_only_one_cookie
assert
numeric_literal
19
import pytest from xhshow import Xhshow from xhshow.core.common_sign import XsCommonSigner class TestCookieParsingEdgeCases: def setup_method(self): self.client = Xhshow() def test_cookie_string_only_one_cookie(self): """测试只有一个 cookie 的字符串""" cookie_string = "a1=test_value" ...
1
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_cookie_parsing.py
test_sign_headers_get_with_dict
assert
numeric_literal
36
import pytest from xhshow import Xhshow from xhshow.core.common_sign import XsCommonSigner class TestSignHeaders: def setup_method(self): self.client = Xhshow() def test_sign_headers_get_with_dict(self): """测试 GET 请求使用字典 cookies""" cookies = { "a1": "test_a1_value", ...
16
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_cookie_parsing.py
test_sign_headers_get_with_dict
assert
numeric_literal
37
import pytest from xhshow import Xhshow from xhshow.core.common_sign import XsCommonSigner class TestSignHeaders: def setup_method(self): self.client = Xhshow() def test_sign_headers_get_with_dict(self): """测试 GET 请求使用字典 cookies""" cookies = { "a1": "test_a1_value", ...
32
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_cookie_parsing.py
test_cookie_with_unicode
assert
string_literal
23
import pytest from xhshow import Xhshow from xhshow.core.common_sign import XsCommonSigner class TestCookieParsingEdgeCases: def setup_method(self): self.client = Xhshow() def test_cookie_with_unicode(self): """测试包含 Unicode 字符的 cookie""" cookies_dict = { "a1": "test_a1_值"...
"测试"
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_cookie_parsing.py
test_parse_cookies_from_string
assert
variable
19
import pytest from xhshow import Xhshow from xhshow.core.common_sign import XsCommonSigner class TestCookieParsing: def setup_method(self): self.client = Xhshow() def test_parse_cookies_from_string(self): """测试从字符串解析 cookies""" cookie_string = "a1=test_a1_value; web_session=test_sess...
result
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_crypto.py
test_base64_encoder
assert
numeric_literal
18
import pytest from xhshow import CryptoProcessor, Xhshow from xhshow.core.crc32_encrypt import CRC32 class TestCryptoProcessor: def setup_method(self): self.crypto = CryptoProcessor() def test_base64_encoder(self): """测试自定义Base64编码""" test_string = "Hello, World!" result = se...
0
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_crypto.py
test_hex_processor
assert
numeric_literal
20
import pytest from xhshow import CryptoProcessor, Xhshow from xhshow.core.crc32_encrypt import CRC32 class TestCryptoProcessor: def setup_method(self): self.crypto = CryptoProcessor() def test_hex_processor(self): """测试十六进制处理""" hex_string = "d41d8cd98f00b204e9800998ecf8427e" ...
8
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_crypto.py
test_build_payload_array_basic
assert
numeric_literal
20
import pytest from xhshow import CryptoProcessor, Xhshow from xhshow.core.crc32_encrypt import CRC32 class TestCryptoProcessor: def setup_method(self): self.crypto = CryptoProcessor() def test_build_payload_array_basic(self): """测试载荷数组构建基本功能""" hex_param = "d41d8cd98f00b204e9800998ec...
50
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_crypto.py
test_random_generator
assert
numeric_literal
17
import pytest from xhshow import CryptoProcessor, Xhshow from xhshow.core.crc32_encrypt import CRC32 class TestCryptoProcessor: def setup_method(self): self.crypto = CryptoProcessor() def test_random_generator(self): """测试随机数生成器""" # 测试随机字节 result = self.crypto.random_gen.gen...
10
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_crypto.py
test_generate_d_value_get
assert
numeric_literal
22
import pytest from xhshow import CryptoProcessor, Xhshow from xhshow.core.crc32_encrypt import CRC32 class TestXhshow: def setup_method(self): self.client = Xhshow() def test_generate_d_value_get(self): """测试GET请求的d值生成""" method = "GET" uri = "/api/sns/web/v1/user_posted" ...
32
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_crypto.py
test_trace_id_generation
assert
numeric_literal
18
import pytest from xhshow import CryptoProcessor, Xhshow from xhshow.core.crc32_encrypt import CRC32 class TestIntegration: def test_trace_id_generation(self): """测试 Trace ID 生成""" import time client = Xhshow() # Test b3 trace id b3_id = client.get_b3_trace_id() ...
16
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_url_utils.py
test_extract_uri_with_fragment
assert
string_literal
11
import pytest from xhshow import Xhshow from xhshow.utils.url_utils import build_url, extract_uri class TestExtractUri: def test_extract_uri_with_fragment(self): url = "https://example.com/path#section" assert extract_uri(url) ==
"/path"
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_url_utils.py
test_build_url_with_none_value
assert
string_literal
11
import pytest from xhshow import Xhshow from xhshow.utils.url_utils import build_url, extract_uri class TestBuildUrl: def test_build_url_with_none_value(self): url = build_url("/api/path", {"empty": None}) assert url ==
"/api/path?empty="
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_url_utils.py
test_build_url_basic
assert
string_literal
11
import pytest from xhshow import Xhshow from xhshow.utils.url_utils import build_url, extract_uri class TestGithubSmokeTest: def test_build_url_basic(self): result = build_url("/api/search", {"q": "test"}) assert result ==
"/api/search?q=test"
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_url_utils.py
test_build_url_with_list_value
assert
string_literal
11
import pytest from xhshow import Xhshow from xhshow.utils.url_utils import build_url, extract_uri class TestBuildUrl: def test_build_url_with_list_value(self): url = build_url("/api/path", {"ids": [1, 2, 3]}) assert url ==
"/api/path?ids=1,2,3"
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_url_utils.py
test_build_url_with_tuple_value
assert
string_literal
11
import pytest from xhshow import Xhshow from xhshow.utils.url_utils import build_url, extract_uri class TestBuildUrl: def test_build_url_with_tuple_value(self): url = build_url("/api/path", {"tags": ("a", "b", "c")}) assert url ==
"/api/path?tags=a,b,c"
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_url_utils.py
test_extract_uri_basic
assert
string_literal
11
import pytest from xhshow import Xhshow from xhshow.utils.url_utils import build_url, extract_uri class TestGithubSmokeTest: def test_extract_uri_basic(self): result = extract_uri("https://edith.xiaohongshu.com/api/sns/web/v1/search") assert result ==
"/api/sns/web/v1/search"
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_url_utils.py
test_client_build_url_with_equals
assert
string_literal
12
import pytest from xhshow import Xhshow from xhshow.utils.url_utils import build_url, extract_uri class TestXhshowClientUrlMethods: def test_client_build_url_with_equals(self): client = Xhshow() url = client.build_url("/api/path", {"token": "abc=def"}) assert url ==
"/api/path?token=abc%3Ddef"
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor
Cloxl/xhshow
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
train
train
tests/test_url_utils.py
test_extract_uri_from_uri_only
assert
string_literal
11
import pytest from xhshow import Xhshow from xhshow.utils.url_utils import build_url, extract_uri class TestExtractUri: def test_extract_uri_from_uri_only(self): uri = "/api/sns/web/v1/user_posted" assert extract_uri(uri) ==
"/api/sns/web/v1/user_posted"
89a1e540db289b39a1aab8a2ccef62e5a77b17e9
4
v2_extractor_at_anchor