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
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_llm_client.py
test_llm_client_vllm_initialization
assert
string_literal
21
from unittest.mock import MagicMock, patch import pytest from synthetic_data_kit.models.llm_client import LLMClient @pytest.mark.unit def test_llm_client_vllm_initialization(patch_config, test_env): """Test LLM client initialization with vLLM provider.""" with patch("requests.get") as mock_get: mock_...
"vllm"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_llm_client.py
test_llm_client_initialization
assert
string_literal
19
from unittest.mock import MagicMock, patch import pytest from synthetic_data_kit.models.llm_client import LLMClient @pytest.mark.unit def test_llm_client_initialization(patch_config, test_env): """Test LLM client initialization with API endpoint provider.""" with patch("synthetic_data_kit.models.llm_client.O...
"api-endpoint"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_llm_client.py
test_llm_client_chat_completion
assert
string_literal
48
from unittest.mock import MagicMock, patch import pytest from synthetic_data_kit.models.llm_client import LLMClient @pytest.mark.unit def test_llm_client_chat_completion(patch_config, test_env): """Test LLM client chat completion with API endpoint provider.""" with patch("synthetic_data_kit.models.llm_client...
"This is a test response"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_llm_processing.py
test_parse_qa_pairs
assert
numeric_literal
31
import pytest from synthetic_data_kit.utils import llm_processing @pytest.mark.unit def test_parse_qa_pairs(): """Test parsing QA pairs from LLM output.""" # Test with a JSON array containing multiple QA pairs json_text = """ Here is the result: [ { "question": "What is synthet...
3
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_llm_processing.py
test_parse_qa_pairs_with_regex
assert
numeric_literal
20
import pytest from synthetic_data_kit.utils import llm_processing @pytest.mark.unit def test_parse_qa_pairs_with_regex(): """Test parsing QA pairs using regex fallback.""" # Test with a non-JSON format that requires regex pattern matching # Format the text exactly as the regex pattern expects text = "...
2
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_llm_processing.py
test_convert_to_conversation_format
assert
string_literal
28
import pytest from synthetic_data_kit.utils import llm_processing @pytest.mark.unit def test_convert_to_conversation_format(): """Test converting QA pairs to conversation format.""" qa_pairs = [ { "question": "What is synthetic data?", "answer": "Synthetic data is artificially ...
"user"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_llm_processing.py
test_convert_to_conversation_format
assert
string_literal
27
import pytest from synthetic_data_kit.utils import llm_processing @pytest.mark.unit def test_convert_to_conversation_format(): """Test converting QA pairs to conversation format.""" qa_pairs = [ { "question": "What is synthetic data?", "answer": "Synthetic data is artificially ...
"system"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_llm_processing.py
test_convert_to_conversation_format
assert
string_literal
30
import pytest from synthetic_data_kit.utils import llm_processing @pytest.mark.unit def test_convert_to_conversation_format(): """Test converting QA pairs to conversation format.""" qa_pairs = [ { "question": "What is synthetic data?", "answer": "Synthetic data is artificially ...
"assistant"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_llm_processing.py
test_parse_qa_pairs
assert
string_literal
32
import pytest from synthetic_data_kit.utils import llm_processing @pytest.mark.unit def test_parse_qa_pairs(): """Test parsing QA pairs from LLM output.""" # Test with a JSON array containing multiple QA pairs json_text = """ Here is the result: [ { "question": "What is synthet...
"What is synthetic data?"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_llm_processing.py
test_parse_qa_pairs
assert
string_literal
33
import pytest from synthetic_data_kit.utils import llm_processing @pytest.mark.unit def test_parse_qa_pairs(): """Test parsing QA pairs from LLM output.""" # Test with a JSON array containing multiple QA pairs json_text = """ Here is the result: [ { "question": "What is synthet...
"Why use synthetic data?"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_llm_processing.py
test_parse_qa_pairs
assert
string_literal
34
import pytest from synthetic_data_kit.utils import llm_processing @pytest.mark.unit def test_parse_qa_pairs(): """Test parsing QA pairs from LLM output.""" # Test with a JSON array containing multiple QA pairs json_text = """ Here is the result: [ { "question": "What is synthet...
"How can synthetic data help with ML?"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_parsers.py
test_txt_parser
assert
variable
38
import os import tempfile from unittest.mock import MagicMock, patch import pytest from synthetic_data_kit.parsers.html_parser import HTMLParser from synthetic_data_kit.parsers.pdf_parser import PDFParser from synthetic_data_kit.parsers.txt_parser import TXTParser @pytest.mark.unit def test_txt_parser(): """Test...
content
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_parsers.py
test_pdf_parser
assert_*
variable
29
import os import tempfile from unittest.mock import MagicMock, patch import pytest from synthetic_data_kit.parsers.html_parser import HTMLParser from synthetic_data_kit.parsers.pdf_parser import PDFParser from synthetic_data_kit.parsers.txt_parser import TXTParser @pytest.mark.unit def test_pdf_parser(): """Test...
file_path)
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_parsers.py
test_pdf_parser
assert
string_literal
43
import os import tempfile from unittest.mock import MagicMock, patch import pytest from synthetic_data_kit.parsers.html_parser import HTMLParser from synthetic_data_kit.parsers.pdf_parser import PDFParser from synthetic_data_kit.parsers.txt_parser import TXTParser @pytest.mark.unit def test_pdf_parser(): """Test...
"This is sample PDF content for testing."
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_parsers.py
test_txt_parser
assert
string_literal
28
import os import tempfile from unittest.mock import MagicMock, patch import pytest from synthetic_data_kit.parsers.html_parser import HTMLParser from synthetic_data_kit.parsers.pdf_parser import PDFParser from synthetic_data_kit.parsers.txt_parser import TXTParser @pytest.mark.unit def test_txt_parser(): """Test...
"This is sample text content for testing."
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_parsers.py
test_pdf_parser
assert
collection
32
import os import tempfile from unittest.mock import MagicMock, patch import pytest from synthetic_data_kit.parsers.html_parser import HTMLParser from synthetic_data_kit.parsers.pdf_parser import PDFParser from synthetic_data_kit.parsers.txt_parser import TXTParser @pytest.mark.unit def test_pdf_parser(): """Test...
[{"text": "This is sample PDF content for testing."}]
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_qa_generator.py
test_generate_qa_pairs
assert
numeric_literal
44
import json from unittest.mock import MagicMock import pytest from synthetic_data_kit.generators.qa_generator import QAGenerator @pytest.mark.unit def test_generate_qa_pairs(patch_config): """Test generating QA pairs.""" # Create mock LLM client mock_client = MagicMock() mock_client.batch_completion....
2
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_qa_generator.py
test_rate_qa_pairs
assert
numeric_literal
50
import json from unittest.mock import MagicMock import pytest from synthetic_data_kit.generators.qa_generator import QAGenerator @pytest.mark.unit def test_rate_qa_pairs(patch_config): """Test rating QA pairs.""" # Create mock LLM client mock_client = MagicMock() mock_client.chat_completion.return_va...
1
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_qa_generator.py
test_rate_qa_pairs
assert
numeric_literal
52
import json from unittest.mock import MagicMock import pytest from synthetic_data_kit.generators.qa_generator import QAGenerator @pytest.mark.unit def test_rate_qa_pairs(patch_config): """Test rating QA pairs.""" # Create mock LLM client mock_client = MagicMock() mock_client.chat_completion.return_va...
8
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_qa_generator.py
test_rate_qa_pairs
assert
numeric_literal
57
import json from unittest.mock import MagicMock import pytest from synthetic_data_kit.generators.qa_generator import QAGenerator @pytest.mark.unit def test_rate_qa_pairs(patch_config): """Test rating QA pairs.""" # Create mock LLM client mock_client = MagicMock() mock_client.chat_completion.return_va...
0.5
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_qa_generator.py
test_qa_generator_initialization
assert
none_literal
20
import json from unittest.mock import MagicMock import pytest from synthetic_data_kit.generators.qa_generator import QAGenerator @pytest.mark.unit def test_qa_generator_initialization(patch_config): """Test QA generator initialization.""" # Create mock LLM client mock_client = MagicMock() # Initiali...
None
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_qa_generator.py
test_process_document
assert
variable
43
import json from unittest.mock import MagicMock import pytest from synthetic_data_kit.generators.qa_generator import QAGenerator @pytest.mark.unit def test_process_document(patch_config): """Test processing a document end-to-end.""" # Create mock LLM client mock_client = MagicMock() mock_client.chat_...
result
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_qa_generator.py
test_qa_generator_initialization
assert
variable
19
import json from unittest.mock import MagicMock import pytest from synthetic_data_kit.generators.qa_generator import QAGenerator @pytest.mark.unit def test_qa_generator_initialization(patch_config): """Test QA generator initialization.""" # Create mock LLM client mock_client = MagicMock() # Initiali...
mock_client
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_qa_generator.py
test_generate_qa_pairs
assert
string_literal
45
import json from unittest.mock import MagicMock import pytest from synthetic_data_kit.generators.qa_generator import QAGenerator @pytest.mark.unit def test_generate_qa_pairs(patch_config): """Test generating QA pairs.""" # Create mock LLM client mock_client = MagicMock() mock_client.batch_completion....
"What is synthetic data?"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_qa_generator.py
test_generate_qa_pairs
assert
string_literal
46
import json from unittest.mock import MagicMock import pytest from synthetic_data_kit.generators.qa_generator import QAGenerator @pytest.mark.unit def test_generate_qa_pairs(patch_config): """Test generating QA pairs.""" # Create mock LLM client mock_client = MagicMock() mock_client.batch_completion....
"Why use synthetic data?"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_qa_generator.py
test_generate_summary
assert
string_literal
23
import json from unittest.mock import MagicMock import pytest from synthetic_data_kit.generators.qa_generator import QAGenerator @pytest.mark.unit def test_generate_summary(patch_config): """Test generating summary.""" # Create mock LLM client mock_client = MagicMock() mock_client.chat_completion.ret...
"This is a summary of the document."
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_split_into_chunks
assert
numeric_literal
19
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_split_into_chunks(): """Test splitting text into chunks.""" # Create multi-paragraph text paragraphs = ["Paragraph one." * 5, "Paragraph two." * 5, "Paragraph three." * 5] text_content ...
0
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_split_into_chunks
assert
numeric_literal
22
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_split_into_chunks(): """Test splitting text into chunks.""" # Create multi-paragraph text paragraphs = ["Paragraph one." * 5, "Paragraph two." * 5, "Paragraph three." * 5] text_content ...
2
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_split_into_chunks
assert
collection
32
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_split_into_chunks(): """Test splitting text into chunks.""" # Create multi-paragraph text paragraphs = ["Paragraph one." * 5, "Paragraph two." * 5, "Paragraph three." * 5] text_content ...
[]
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_extract_json_from_text
assert
variable
26
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_extract_json_from_text(): """Test extracting JSON from text.""" # Test valid JSON in code block json_text = """ Some random text before the JSON ```json { "question": "W...
result
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_get_llm_provider
assert
string_literal
17
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_get_llm_provider(mock_config): """Test getting the LLM provider from config.""" provider = config.get_llm_provider(mock_config) assert provider == "api-endpoint" # Test with empty conf...
"vllm"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_get_path_config
assert
string_literal
31
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_get_path_config(): """Test getting path configuration.""" # Create a test config with proper structure test_config = { "paths": { "output": {"default": "data/output", "g...
"data/pdf"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_extract_json_from_text
pytest.raises
variable
36
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_extract_json_from_text(): """Test extracting JSON from text.""" # Test valid JSON in code block json_text = """ Some random text before the JSON ```json { "question": "W...
ValueError)
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_load_config
assert
string_literal
25
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_load_config(tmpdir): """Test loading config from file.""" # Create a temporary config file config_path = Path(tmpdir) / "test_config.yaml" with open(config_path, "w") as f: f.w...
"test-model"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_get_path_config
assert
string_literal
28
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_get_path_config(): """Test getting path configuration.""" # Create a test config with proper structure test_config = { "paths": { "output": {"default": "data/output", "g...
"data/input"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_get_path_config
assert
string_literal
21
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_get_path_config(): """Test getting path configuration.""" # Create a test config with proper structure test_config = { "paths": { "output": {"default": "data/output", "g...
"data/output"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_get_llm_provider
assert
string_literal
12
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_get_llm_provider(mock_config): """Test getting the LLM provider from config.""" provider = config.get_llm_provider(mock_config) assert provider ==
"api-endpoint"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_load_config
assert
string_literal
23
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_load_config(tmpdir): """Test loading config from file.""" # Create a temporary config file config_path = Path(tmpdir) / "test_config.yaml" with open(config_path, "w") as f: f.w...
"test-provider"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_load_config
assert
string_literal
24
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_load_config(tmpdir): """Test loading config from file.""" # Create a temporary config file config_path = Path(tmpdir) / "test_config.yaml" with open(config_path, "w") as f: f.w...
"http://test-api.com"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_extract_json_from_text
assert
string_literal
27
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_extract_json_from_text(): """Test extracting JSON from text.""" # Test valid JSON in code block json_text = """ Some random text before the JSON ```json { "question": "W...
"What is synthetic data?"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_extract_json_list_from_text
assert
string_literal
33
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_extract_json_list_from_text(): """Test extracting JSON list from text.""" json_text = """ Some random text before the JSON ```json [ { "question": "What is synth...
"Why use synthetic data?"
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/unit/test_utils.py
test_extract_json_from_text
assert
string_literal
28
from pathlib import Path import pytest from synthetic_data_kit.utils import config, text @pytest.mark.unit def test_extract_json_from_text(): """Test extracting JSON from text.""" # Test valid JSON in code block json_text = """ Some random text before the JSON ```json { "question": "W...
"Synthetic data is artificially generated data."
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/utils/test_helpers.py
assert_directory_stats
assert
variable
22
import os import tempfile import json from typing import Dict, List, Tuple, Optional, Any from pathlib import Path from unittest.mock import patch class DirectoryStatsHelper: @staticmethod def assert_directory_stats(stats: Dict[str, Any], expected_total: int, ...
expected_total
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/utils/test_helpers.py
assert_directory_stats
assert
variable
25
import os import tempfile import json from typing import Dict, List, Tuple, Optional, Any from pathlib import Path from unittest.mock import patch class DirectoryStatsHelper: @staticmethod def assert_directory_stats(stats: Dict[str, Any], expected_total: int, ...
expected_supported
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
tests/utils/test_helpers.py
assert_directory_stats
assert
variable
29
import os import tempfile import json from typing import Dict, List, Tuple, Optional, Any from pathlib import Path from unittest.mock import patch class DirectoryStatsHelper: @staticmethod def assert_directory_stats(stats: Dict[str, Any], expected_total: int, ...
expected_unsupported
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
use-cases/multimodal-qa/multimodal_qa_example.py
test_single_file_mode
assert
numeric_literal
38
import os import shutil import requests import lance from synthetic_data_kit.cli import app from typer.testing import CliRunner PDF_URL = "https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf" OUTPUT_DIR = "example_output" def test_single_file_mode(): """Tests the singl...
0
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
meta-llama/synthetic-data-kit
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
train
train
use-cases/multimodal-qa/multimodal_qa_example.py
test_folder_mode
assert
variable
42
import os import shutil import requests import lance from synthetic_data_kit.cli import app from typer.testing import CliRunner PDF_URL = "https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf" OUTPUT_DIR = "example_output" def test_folder_mode(): """Tests the folder pro...
num_files
b269de90aa123fe9edfb70d31c20b76b5907db4d
1
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_async_http_client.py
test_send_transaction_cached_blockhash
assert
numeric_literal
39
from typing import Tuple import pytest from solders.rpc.requests import GetBlockHeight, GetFirstAvailableBlock from solders.rpc.responses import GetBlockHeightResp, GetFirstAvailableBlockResp, Resp from solders.rpc.errors import SendTransactionPreflightFailureMessage import solana.system_program as sp from solana.blo...
0
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_async_http_client.py
test_send_transaction_cached_blockhash
assert
numeric_literal
46
from typing import Tuple import pytest from solders.rpc.requests import GetBlockHeight, GetFirstAvailableBlock from solders.rpc.responses import GetBlockHeightResp, GetFirstAvailableBlockResp, Resp from solders.rpc.errors import SendTransactionPreflightFailureMessage import solana.system_program as sp from solana.blo...
1
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_async_http_client.py
test_send_raw_transaction_and_get_balance
assert
none_literal
31
from typing import Tuple import pytest from solders.rpc.requests import GetBlockHeight, GetFirstAvailableBlock from solders.rpc.responses import GetBlockHeightResp, GetFirstAvailableBlockResp, Resp from solders.rpc.errors import SendTransactionPreflightFailureMessage import solana.system_program as sp from solana.blo...
None
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_async_http_client.py
test_request_air_drop
assert_*
variable
29
from typing import Tuple import pytest from solders.rpc.requests import GetBlockHeight, GetFirstAvailableBlock from solders.rpc.responses import GetBlockHeightResp, GetFirstAvailableBlockResp, Resp from solders.rpc.errors import SendTransactionPreflightFailureMessage import solana.system_program as sp from solana.blo...
resp)
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_async_token_client.py
test_token
assert
numeric_literal
43
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.async_client import AsyncToken from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, O...
0
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_async_token_client.py
test_get_mint_info
assert
numeric_literal
32
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.async_client import AsyncToken from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, O...
6
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_async_token_client.py
test_get_accounts
assert
numeric_literal
31
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.async_client import AsyncToken from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, O...
2
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_async_token_client.py
test_burn_checked
assert
numeric_literal
48
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.async_client import AsyncToken from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, O...
0.0
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_async_token_client.py
test_get_account_info
assert
bool_literal
32
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.async_client import AsyncToken from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, O...
True
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_async_token_client.py
test_get_account_info
assert
none_literal
36
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.async_client import AsyncToken from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, O...
None
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_async_token_client.py
test_token
assert_*
variable
20
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.async_client import AsyncToken from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, O...
resp)
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_http_client.py
test_send_transaction_cached_blockhash
assert
numeric_literal
37
from typing import Tuple import pytest from solders.rpc.requests import GetBlockHeight, GetFirstAvailableBlock from solders.rpc.responses import GetBlockHeightResp, GetFirstAvailableBlockResp, Resp from solders.rpc.errors import SendTransactionPreflightFailureMessage import solana.system_program as sp from solana.blo...
0
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_http_client.py
test_send_transaction_cached_blockhash
assert
numeric_literal
42
from typing import Tuple import pytest from solders.rpc.requests import GetBlockHeight, GetFirstAvailableBlock from solders.rpc.responses import GetBlockHeightResp, GetFirstAvailableBlockResp, Resp from solders.rpc.errors import SendTransactionPreflightFailureMessage import solana.system_program as sp from solana.blo...
1
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_http_client.py
test_send_raw_transaction_and_get_balance
assert
none_literal
29
from typing import Tuple import pytest from solders.rpc.requests import GetBlockHeight, GetFirstAvailableBlock from solders.rpc.responses import GetBlockHeightResp, GetFirstAvailableBlockResp, Resp from solders.rpc.errors import SendTransactionPreflightFailureMessage import solana.system_program as sp from solana.blo...
None
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_http_client.py
test_request_air_drop
assert_*
variable
27
from typing import Tuple import pytest from solders.rpc.requests import GetBlockHeight, GetFirstAvailableBlock from solders.rpc.responses import GetBlockHeightResp, GetFirstAvailableBlockResp, Resp from solders.rpc.errors import SendTransactionPreflightFailureMessage import solana.system_program as sp from solana.blo...
resp)
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_memo.py
test_send_memo_in_transaction
assert
none_literal
38
from json import loads import pytest from solders.transaction_status import ParsedInstruction from solana.keypair import Keypair from solana.rpc.api import Client from solana.rpc.commitment import Finalized from solana.transaction import Transaction from spl.memo.constants import MEMO_PROGRAM_ID from spl.memo.instruc...
None
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_memo.py
test_send_memo_in_transaction
assert_*
variable
33
from json import loads import pytest from solders.transaction_status import ParsedInstruction from solana.keypair import Keypair from solana.rpc.api import Client from solana.rpc.commitment import Finalized from solana.transaction import Transaction from spl.memo.constants import MEMO_PROGRAM_ID from spl.memo.instruc...
resp)
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_memo.py
test_send_memo_in_transaction
assert
variable
45
from json import loads import pytest from solders.transaction_status import ParsedInstruction from solana.keypair import Keypair from solana.rpc.api import Client from solana.rpc.commitment import Finalized from solana.transaction import Transaction from spl.memo.constants import MEMO_PROGRAM_ID from spl.memo.instruc...
raw_message
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_recent_performance_samples.py
test_get_recent_performance_samples_async
assert_*
variable
17
import time from pytest import fixture, mark from .utils import assert_valid_response def _wait_until_ready() -> None: """Sleep for a minute so that performance samples are available.""" time.sleep(60) @mark.integration @mark.asyncio async def test_get_recent_performance_samples_async(test_http_client_async...
resp)
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_token_client.py
test_token
assert
numeric_literal
43
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.client import Token from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, OPTS, assert...
0
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_token_client.py
test_get_mint_info
assert
numeric_literal
30
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.client import Token from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, OPTS, assert...
6
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_token_client.py
test_get_accounts
assert
numeric_literal
29
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.client import Token from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, OPTS, assert...
2
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_token_client.py
test_burn_checked
assert
numeric_literal
46
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.client import Token from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, OPTS, assert...
0.0
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_token_client.py
test_get_account_info
assert
bool_literal
30
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.client import Token from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, OPTS, assert...
True
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_token_client.py
test_get_account_info
assert
none_literal
34
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.client import Token from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, OPTS, assert...
None
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_token_client.py
test_token
assert_*
variable
37
from json import loads import pytest import spl.token._layouts as layouts from solana.publickey import PublicKey from solana.rpc.commitment import Finalized from spl.token.client import Token from spl.token.constants import ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID from .utils import AIRDROP_AMOUNT, OPTS, assert...
resp)
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_websockets.py
test_slot_subscribe
assert
numeric_literal
173
from typing import AsyncGenerator, List, Tuple import asyncstdlib import pytest from solders.rpc.config import RpcTransactionLogsFilter, RpcTransactionLogsFilterMentions from solders.rpc.requests import AccountSubscribe, AccountUnsubscribe, Body, LogsSubscribe, LogsUnsubscribe from solders.rpc.responses import ( A...
0
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_websockets.py
test_multiple_subscriptions
assert
none_literal
176
from typing import AsyncGenerator, List, Tuple import asyncstdlib import pytest from solders.rpc.config import RpcTransactionLogsFilter, RpcTransactionLogsFilterMentions from solders.rpc.requests import AccountSubscribe, AccountUnsubscribe, Body, LogsSubscribe, LogsUnsubscribe from solders.rpc.responses import ( A...
None
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_websockets.py
test_multiple_subscriptions
assert
variable
184
from typing import AsyncGenerator, List, Tuple import asyncstdlib import pytest from solders.rpc.config import RpcTransactionLogsFilter, RpcTransactionLogsFilterMentions from solders.rpc.requests import AccountSubscribe, AccountUnsubscribe, Body, LogsSubscribe, LogsUnsubscribe from solders.rpc.responses import ( A...
AIRDROP_AMOUNT
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_websockets.py
test_program_subscribe
assert
func_call
179
from typing import AsyncGenerator, List, Tuple import asyncstdlib import pytest from solders.rpc.config import RpcTransactionLogsFilter, RpcTransactionLogsFilterMentions from solders.rpc.requests import AccountSubscribe, AccountUnsubscribe, Body, LogsSubscribe, LogsUnsubscribe from solders.rpc.responses import ( A...
owned.public_key.to_solders()
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/test_websockets.py
test_logs_subscribe
assert
string_literal
176
from typing import AsyncGenerator, List, Tuple import asyncstdlib import pytest from solders.rpc.config import RpcTransactionLogsFilter, RpcTransactionLogsFilterMentions from solders.rpc.requests import AccountSubscribe, AccountUnsubscribe, Body, LogsSubscribe, LogsUnsubscribe from solders.rpc.responses import ( A...
"Program 11111111111111111111111111111111 invoke [1]"
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/integration/utils.py
assert_valid_response
assert
variable
15
from typing import get_args from solders.rpc.responses import RPCError, RPCResult from solana.rpc.commitment import Processed from solana.rpc.types import TxOpts AIRDROP_AMOUNT = 10_000_000_000 RPC_RESULT_TYPES = get_args(RPCResult) def assert_valid_response(resp: RPCResult): """Assert valid RPCResult.""" ...
RPC_RESULT_TYPES
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_async_client.py
test_client_address_sig_args_no_commitment
assert
variable
26
from unittest.mock import patch import pytest from httpx import ReadTimeout from solders.commitment_config import CommitmentLevel from solders.pubkey import Pubkey from solders.rpc.config import RpcSignaturesForAddressConfig from solders.rpc.requests import GetSignaturesForAddress from solders.signature import Signatu...
actual
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_async_client.py
test_async_client_http_exception
assert
variable
23
from unittest.mock import patch import pytest from httpx import ReadTimeout from solders.commitment_config import CommitmentLevel from solders.pubkey import Pubkey from solders.rpc.config import RpcSignaturesForAddressConfig from solders.rpc.requests import GetSignaturesForAddress from solders.signature import Signatu...
SolanaRpcException
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_async_client.py
test_async_client_http_exception
pytest.raises
variable
21
from unittest.mock import patch import pytest from httpx import ReadTimeout from solders.commitment_config import CommitmentLevel from solders.pubkey import Pubkey from solders.rpc.config import RpcSignaturesForAddressConfig from solders.rpc.requests import GetSignaturesForAddress from solders.signature import Signatu...
SolanaRpcException)
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_async_client.py
test_async_client_http_exception
assert
string_literal
24
from unittest.mock import patch import pytest from httpx import ReadTimeout from solders.commitment_config import CommitmentLevel from solders.pubkey import Pubkey from solders.rpc.config import RpcSignaturesForAddressConfig from solders.rpc.requests import GetSignaturesForAddress from solders.signature import Signatu...
"<class 'httpx.ReadTimeout'> raised in \"GetEpochInfo\" endpoint request"
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_client.py
test_client_address_sig_args_no_commitment
assert
variable
26
from unittest.mock import patch import pytest from requests.exceptions import ReadTimeout from solders.commitment_config import CommitmentLevel from solders.pubkey import Pubkey from solders.rpc.config import RpcSignaturesForAddressConfig from solders.rpc.requests import GetSignaturesForAddress from solders.signature ...
actual
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_client.py
test_client_http_exception
assert
variable
23
from unittest.mock import patch import pytest from requests.exceptions import ReadTimeout from solders.commitment_config import CommitmentLevel from solders.pubkey import Pubkey from solders.rpc.config import RpcSignaturesForAddressConfig from solders.rpc.requests import GetSignaturesForAddress from solders.signature ...
SolanaRpcException
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_client.py
test_client_http_exception
pytest.raises
variable
21
from unittest.mock import patch import pytest from requests.exceptions import ReadTimeout from solders.commitment_config import CommitmentLevel from solders.pubkey import Pubkey from solders.rpc.config import RpcSignaturesForAddressConfig from solders.rpc.requests import GetSignaturesForAddress from solders.signature ...
SolanaRpcException)
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_client.py
test_client_http_exception
assert
string_literal
24
from unittest.mock import patch import pytest from requests.exceptions import ReadTimeout from solders.commitment_config import CommitmentLevel from solders.pubkey import Pubkey from solders.rpc.config import RpcSignaturesForAddressConfig from solders.rpc.requests import GetSignaturesForAddress from solders.signature ...
"<class 'requests.exceptions.ReadTimeout'> raised in \"GetEpochInfo\" endpoint request"
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_cluster_api_url.py
test_input_output
assert
string_literal
9
from solana.utils.cluster import cluster_api_url def test_input_output(): """Test that cluster_api_url generates the expected output.""" assert cluster_api_url() == "https://api.devnet.solana.com" assert cluster_api_url("devnet") == "https://api.devnet.solana.com" assert cluster_api_url("devnet", True)...
"http://api.devnet.solana.com"
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_cluster_api_url.py
test_input_output
assert
string_literal
6
from solana.utils.cluster import cluster_api_url def test_input_output(): """Test that cluster_api_url generates the expected output.""" assert cluster_api_url() ==
"https://api.devnet.solana.com"
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_helpers.py
test_to_uint8_bytes
assert
string_literal
8
import pytest from solana.utils import helpers def test_to_uint8_bytes(): """Test int to uint8 bytes.""" assert helpers.to_uint8_bytes(255) ==
b"\xff"
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_helpers.py
test_to_uint8_bytes
pytest.raises
variable
9
import pytest from solana.utils import helpers def test_to_uint8_bytes(): """Test int to uint8 bytes.""" assert helpers.to_uint8_bytes(255) == b"\xff" with pytest.raises(
OverflowError)
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_keypair.py
test_set_operations
assert
numeric_literal
16
import base64 from solders.pubkey import Pubkey from solana.keypair import Keypair def test_set_operations() -> None: """Tests that a keypair is now hashable with the appropriate set operations.""" keypair_primary = Keypair.generate() keypair_secondary = Keypair.generate() keypair_duplicate = keypair...
2
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_keypair.py
test_new_keypair
assert
numeric_literal
11
import base64 from solders.pubkey import Pubkey from solana.keypair import Keypair def test_new_keypair() -> None: """Test new keypair with random seed is created successfully.""" keypair = Keypair() assert len(keypair.secret_key) ==
64
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_keypair.py
test_create_from_seed
assert
variable
13
import base64 from solders.pubkey import Pubkey from solana.keypair import Keypair def test_create_from_seed() -> None: """Test creation with 32-byte secret seed.""" seed = bytes([8] * 32) keypair = Keypair.from_seed(seed) assert str(keypair.public_key) == "2KW2XRd9kwqet15Aha2oK3tYvd3nWbTFH1MBiRAv1BE...
seed
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_keypair.py
test_create_from_secret_key
assert
variable
15
import base64 from solders.pubkey import Pubkey from solana.keypair import Keypair def test_create_from_secret_key() -> None: """Test creation with 64-byte secret key.""" secret_key = base64.b64decode( "mdqVWeFekT7pqy5T49+tV12jO0m+ESW7ki4zSU9JiCgbL0kJbj5dvQ/PqcDAzZLZqzshVEs01d1KZdmLh4uZIg==" ) ...
secret_key
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_keypair.py
test_new_keypair
assert
complex_expr
12
import base64 from solders.pubkey import Pubkey from solana.keypair import Keypair def test_new_keypair() -> None: """Test new keypair with random seed is created successfully.""" keypair = Keypair() assert len(keypair.secret_key) == 64 assert len(bytes(keypair.public_key)) ==
Pubkey.LENGTH
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_keypair.py
test_set_operations
assert
func_call
14
import base64 from solders.pubkey import Pubkey from solana.keypair import Keypair def test_set_operations() -> None: """Tests that a keypair is now hashable with the appropriate set operations.""" keypair_primary = Keypair.generate() keypair_secondary = Keypair.generate() keypair_duplicate = keypair...
keypair_secondary.__hash__()
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_keypair.py
test_set_operations
assert
func_call
15
import base64 from solders.pubkey import Pubkey from solana.keypair import Keypair def test_set_operations() -> None: """Tests that a keypair is now hashable with the appropriate set operations.""" keypair_primary = Keypair.generate() keypair_secondary = Keypair.generate() keypair_duplicate = keypair...
keypair_duplicate.__hash__()
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_keypair.py
test_create_from_secret_key
assert
string_literal
14
import base64 from solders.pubkey import Pubkey from solana.keypair import Keypair def test_create_from_secret_key() -> None: """Test creation with 64-byte secret key.""" secret_key = base64.b64decode( "mdqVWeFekT7pqy5T49+tV12jO0m+ESW7ki4zSU9JiCgbL0kJbj5dvQ/PqcDAzZLZqzshVEs01d1KZdmLh4uZIg==" ) ...
"2q7pyhPwAwZ3QMfZrnAbDhnh9mDUqycszcpf86VgQxhF"
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor
michaelhly/solana-py
33d524545a51c10550d19e2ccad94f225b27439e
80
train
train
tests/unit/test_keypair.py
test_create_from_seed
assert
string_literal
12
import base64 from solders.pubkey import Pubkey from solana.keypair import Keypair def test_create_from_seed() -> None: """Test creation with 32-byte secret seed.""" seed = bytes([8] * 32) keypair = Keypair.from_seed(seed) assert str(keypair.public_key) ==
"2KW2XRd9kwqet15Aha2oK3tYvd3nWbTFH1MBiRAv1BE1"
33d524545a51c10550d19e2ccad94f225b27439e
80
v2_extractor_at_anchor