repo_id
stringclasses
409 values
prefix
large_stringlengths
34
36.3k
target
large_stringlengths
1
498
assertion_type
stringclasses
31 values
difficulty
stringclasses
8 values
test_file
stringlengths
10
121
test_function
stringlengths
1
104
test_class
stringlengths
0
51
lineno
int32
2
11.3k
commit_idx
int32
SWE-bench/SWE-smith
import pytest import subprocess from swesmith.profiles.golang import GoProfile, Gin3c12d2a8 from unittest.mock import patch, mock_open def make_dummy_go_profile(): class DummyGoProfile(GoProfile): owner = "dummy" repo = "dummyrepo" commit = "deadbeefcafebabe" @property def...
True
assert
bool_literal
tests/profiles/test_profiles_golang.py
test_go_profile_build_image_checks_exit_code
129
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.java import get_entities_from_file_java from swesmith.bug_gen.procedural.java.wrappers import ( RemoveTryCatchModifier, RemoveNullCheckModifier, ) @pytest.mark.parametrize( "src", [ """public void foo() { try { doSomething(); } catch ...
src.count("try")
assert
func_call
tests/bug_gen/procedural/java/test_java_wrappers.py
test_remove_try_catch_modifier
48
null
SWE-bench/SWE-smith
import json from swebench.harness.constants import ( KEY_INSTANCE_ID, KEY_MODEL, KEY_PREDICTION, TestStatus, ) from swesmith.harness import grading def test_read_test_output(logs_run_evaluation): instance_id = "pandas-dev__pandas.95280573.pr_53652" test_output_path = logs_run_evaluation / inst...
expected
assert
variable
tests/harness/test_grading.py
test_read_test_output
50
null
SWE-bench/SWE-smith
import pytest import re import warnings from swesmith.bug_gen.adapters.c_sharp import ( get_entities_from_file_c_sharp, ) def entities(test_file_c_sharp): entities = [] get_entities_from_file_c_sharp(entities, test_file_c_sharp) return entities def test_get_entities_from_file_c_sharp_max(test_file_c_...
3
assert
numeric_literal
tests/bug_gen/adapters/test_c_sharp.py
test_get_entities_from_file_c_sharp_max
20
null
SWE-bench/SWE-smith
import pytest import subprocess from unittest.mock import patch, mock_open from swesmith.profiles.java import ( JavaProfile, parse_log_maven_surefire, parse_log_gradle_junit_xml, Gsondd2fe59c, Eureka459fcf59, ) from swebench.harness.constants import TestStatus as Status def make_dummy_java_profile(...
"gson"
assert
string_literal
tests/profiles/test_profiles_java.py
test_gson_profile_properties
270
null
SWE-bench/SWE-smith
import argparse import docker import litellm import json import random import subprocess import yaml from concurrent.futures import ThreadPoolExecutor, as_completed from datasets import load_dataset from litellm import completion, completion_cost from pathlib import Path from swebench.harness.constants import ( DO...
None
assert
none_literal
swesmith/issue_gen/get_from_tests.py
main
227
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.cpp import ( get_entities_from_file_cpp, ) def entities(test_file_cpp): entities = [] get_entities_from_file_cpp(entities, test_file_cpp) return entities def test_get_entities_from_file_cpp_destructor(tmp_path): destructor_file = tmp_path / "destructor...
2
assert
numeric_literal
tests/bug_gen/adapters/test_cpp.py
test_get_entities_from_file_cpp_destructor
152
null
SWE-bench/SWE-smith
import re import warnings import pytest from swesmith.bug_gen.adapters.javascript import get_entities_from_file_js def entities(test_file_js): entities = [] get_entities_from_file_js(entities, test_file_js) return entities def test_get_entities_from_file_js_assignment_arrow_function(tmp_path): assig...
"myVar"
assert
string_literal
tests/bug_gen/adapters/test_javascript.py
test_get_entities_from_file_js_assignment_arrow_function
243
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.cpp import get_entities_from_file_cpp from swesmith.bug_gen.procedural.cpp.control_flow import ( ControlIfElseInvertModifier, ControlShuffleLinesModifier, ) def test_control_if_else_invert_bare_if(tmp_path): """Test that ControlIfElseInvertModifier handles bare ...
result.rewrite
assert
complex_expr
tests/bug_gen/procedural/cpp/test_cpp_control_flow.py
test_control_if_else_invert_bare_if
84
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.java import get_entities_from_file_java from swesmith.bug_gen.procedural.java.remove import ( RemoveConditionalModifier, RemoveAssignModifier, ) @pytest.mark.parametrize( "src", [ """public int foo(int x) { if (x > 0) { return 1; } ...
1
assert
numeric_literal
tests/bug_gen/procedural/java/test_java_remove.py
test_remove_conditional_modifier
32
null
SWE-bench/SWE-smith
import pytest from swesmith.constants import ENV_NAME from unittest.mock import patch, MagicMock, mock_open from pathlib import Path def test_python_profile_custom_python_version(): """Test Python profiles with custom Python versions""" # Test Pydicom7d361b3d which has custom python_version from swesmith.p...
"3.11"
assert
string_literal
tests/profiles/test_profiles_python.py
test_python_profile_custom_python_version
158
null
SWE-bench/SWE-smith
from swesmith.bug_gen.adapters.php import ( get_entities_from_file_php, ) def test_php_entity_one_line_function(tmp_path): """Correctly pick up a function that lives entirely on one line.""" one_line_file = tmp_path / "one_line.php" one_line_file.write_text("<?php\nfunction one_line_function() { return...
1
assert
numeric_literal
tests/bug_gen/adapters/test_php.py
test_php_entity_one_line_function
104
null
SWE-bench/SWE-smith
import re import warnings import pytest from swesmith.bug_gen.adapters.javascript import get_entities_from_file_js def entities(test_file_js): entities = [] get_entities_from_file_js(entities, test_file_js) return entities @pytest.mark.parametrize( "func_definition", [ ("function f() { i...
2
assert
numeric_literal
tests/bug_gen/adapters/test_javascript.py
test_get_entities_from_file_js_complexity_control_flow
195
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.rust import get_entities_from_file_rs from swesmith.bug_gen.procedural.rust.remove import ( RemoveLoopModifier, RemoveConditionalModifier, RemoveAssignModifier, ) @pytest.mark.parametrize( "src,expected", [ ( """fn foo() -> i32 { ...
1
assert
numeric_literal
tests/bug_gen/procedural/rust/test_rust_remove.py
test_remove_loop_modifier
60
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.java import get_entities_from_file_java from swesmith.bug_gen.procedural.java.control_flow import ( ControlIfElseInvertModifier, ) @pytest.mark.parametrize( "src,expected", [ ( """public int foo(int x) { if (x > 0) { return 1; ...
None
assert
none_literal
tests/bug_gen/procedural/java/test_java_control_flow.py
test_control_if_else_invert_modifier
77
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.cpp import get_entities_from_file_cpp from swesmith.bug_gen.procedural.cpp.operations import ( OperationChangeModifier, OperationFlipOperatorModifier, OperationSwapOperandsModifier, OperationBreakChainsModifier, OperationChangeConstantsModifier, FLIPP...
"<"
assert
string_literal
tests/bug_gen/procedural/cpp/test_cpp_operations.py
test_operation_flip_operator_mappings
356
null
SWE-bench/SWE-smith
import warnings import pytest from swesmith.bug_gen.adapters.typescript import get_entities_from_file_ts def entities(test_file_ts): entities = [] get_entities_from_file_ts(entities, test_file_ts) return entities def test_get_entities_from_file_ts_multiline_signature(tmp_path): """Multi-line functio...
None
assert
none_literal
tests/bug_gen/adapters/test_typescript.py
test_get_entities_from_file_ts_multiline_signature
211
null
SWE-bench/SWE-smith
import pytest import subprocess from swesmith.profiles.golang import GoProfile, Gin3c12d2a8 from unittest.mock import patch, mock_open def make_dummy_go_profile(): class DummyGoProfile(GoProfile): owner = "dummy" repo = "dummyrepo" commit = "deadbeefcafebabe" @property def...
"SKIPPED"
assert
string_literal
tests/profiles/test_profiles_golang.py
test_go_profile_log_parser_basic
37
null
SWE-bench/SWE-smith
import json import pytest from swesmith.harness.eval import main as run_evaluation def test_eval_summary_report(logs_run_evaluation): summary_path = logs_run_evaluation / "report.json" assert summary_path.exists(), "Missing summary report.json" with open(summary_path) as f: summary = json.load(f) ...
summary
assert
variable
tests/harness/test_eval.py
test_eval_summary_report
53
null
SWE-bench/SWE-smith
from swesmith.bug_gen.adapters.php import ( get_entities_from_file_php, ) def test_get_entities_from_file_php_unreadable(): """Asserting that unreadable / non-existent files are handled gracefully.""" entities: list = [] # The adapter swallows exceptions internally and simply returns the (still # e...
[]
assert
collection
tests/bug_gen/adapters/test_php.py
test_get_entities_from_file_php_unreadable
83
null
SWE-bench/SWE-smith
import pytest import re import warnings from swesmith.bug_gen.adapters.c_sharp import ( get_entities_from_file_c_sharp, ) def entities(test_file_c_sharp): entities = [] get_entities_from_file_c_sharp(entities, test_file_c_sharp) return entities def test_get_entities_from_file_c_sharp_finalizer(tmp_pa...
1
assert
numeric_literal
tests/bug_gen/adapters/test_c_sharp.py
test_get_entities_from_file_c_sharp_finalizer
63
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.cpp import get_entities_from_file_cpp from swesmith.bug_gen.procedural.cpp.replace_strings import ReplaceStringTypoModifier @pytest.mark.parametrize( "src", [ """void foo() { const char* msg = "Hello World"; }""", """void bar() { std::string ...
src
assert
variable
tests/bug_gen/procedural/cpp/test_cpp_replace_strings.py
test_replace_string_typo_modifier
33
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.java import get_entities_from_file_java from swesmith.bug_gen.procedural.java.control_flow import ( ControlIfElseInvertModifier, ) @pytest.mark.parametrize( "src,expected", [ ( """public int foo(int x) { if (x > 0) { return 1; ...
1
assert
numeric_literal
tests/bug_gen/procedural/java/test_java_control_flow.py
test_control_if_else_invert_modifier
72
null
SWE-bench/SWE-smith
import pytest from swesmith.constants import ENV_NAME from unittest.mock import patch, MagicMock, mock_open from pathlib import Path def test_python_profile_min_testing_flag(): """Test Python profiles with min_testing flag""" # Test Modin8c7799fd which has min_testing=True from swesmith.profiles.python imp...
True
assert
bool_literal
tests/profiles/test_profiles_python.py
test_python_profile_min_testing_flag
168
null
SWE-bench/SWE-smith
import subprocess import urllib.error import pytest import os import shutil from dataclasses import dataclass from pathlib import Path from swebench.harness.constants import FAIL_TO_PASS, KEY_INSTANCE_ID from swesmith.bug_gen.mirror.generate import INSTANCE_REF from swesmith.constants import KEY_PATCH from swesmith.co...
names
assert
variable
tests/profiles/test_base.py
test_extract_entities_simple
629
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.cpp import get_entities_from_file_cpp from swesmith.bug_gen.procedural.cpp.operations import ( OperationChangeModifier, OperationFlipOperatorModifier, OperationSwapOperandsModifier, OperationBreakChainsModifier, OperationChangeConstantsModifier, FLIPP...
None
assert
none_literal
tests/bug_gen/procedural/cpp/test_cpp_operations.py
test_operation_flip_operator_modifier
146
null
SWE-bench/SWE-smith
from swesmith.bug_gen.adapters.golang import get_entities_from_file_go from swesmith.bug_gen.procedural.golang.remove import ( RemoveLoopModifier, RemoveConditionalModifier, RemoveAssignModifier, ) import random def test_remove_loop(test_file_go_caddy_listeners): entities = [] get_entities_from_fil...
expected
assert
variable
tests/bug_gen/procedural/golang/test_go_remove.py
test_remove_loop
24
null
SWE-bench/SWE-smith
import libcst import pytest from swesmith.bug_gen.procedural.python.remove import ( RemoveLoopModifier, RemoveConditionalModifier, RemoveAssignModifier, RemoveWrapperModifier, ) @pytest.mark.parametrize( "src,expected", [ # Remove for loop ( """ def foo(): for i ...
expected.strip()
assert
func_call
tests/bug_gen/procedural/python/test_py_remove.py
test_remove_loop
45
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.rust import get_entities_from_file_rs from swesmith.bug_gen.procedural.rust.remove import ( RemoveLoopModifier, RemoveConditionalModifier, RemoveAssignModifier, ) @pytest.mark.parametrize( "src,expected", [ ( """fn foo() -> i32 { ...
expected.strip()
assert
func_call
tests/bug_gen/procedural/rust/test_rust_remove.py
test_remove_loop_modifier
66
null
SWE-bench/SWE-smith
from swesmith.profiles.rust import RustProfile def test_rust_profile_log_parser_basic(): profile = RustProfile() log = """ test test_some_thing ... ok test test_some_other_thing ... ok test test_some_failure ... FAILED test result: FAILED. 2 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in...
"FAILED"
assert
string_literal
tests/profiles/test_profiles_rust.py
test_rust_profile_log_parser_basic
17
null
SWE-bench/SWE-smith
import pytest import subprocess from swesmith.profiles.golang import GoProfile, Gin3c12d2a8 from unittest.mock import patch, mock_open def make_dummy_go_profile(): class DummyGoProfile(GoProfile): owner = "dummy" repo = "dummyrepo" commit = "deadbeefcafebabe" @property def...
dockerfile
assert
variable
tests/profiles/test_profiles_golang.py
test_gin_profile_dockerfile_content
174
null
SWE-bench/SWE-smith
import warnings import pytest from swesmith.bug_gen.adapters.typescript import get_entities_from_file_ts def entities(test_file_ts): entities = [] get_entities_from_file_ts(entities, test_file_ts) return entities def test_get_entities_from_file_ts_with_type_annotations(tmp_path): ts_file = tmp_path ...
1
assert
numeric_literal
tests/bug_gen/adapters/test_typescript.py
test_get_entities_from_file_ts_with_type_annotations
64
null
SWE-bench/SWE-smith
import pytest import re import warnings from swesmith.bug_gen.adapters.java import ( get_entities_from_file_java, ) def entities(test_file_java): entities = [] get_entities_from_file_java(entities, test_file_java) return entities def test_get_entities_from_file_java_count(entities): assert len(e...
9
assert
numeric_literal
tests/bug_gen/adapters/test_java.py
test_get_entities_from_file_java_count
29
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.cpp import get_entities_from_file_cpp from swesmith.bug_gen.procedural.cpp.control_flow import ( ControlIfElseInvertModifier, ControlShuffleLinesModifier, ) def test_control_shuffle_lines_modifier(tmp_path): """Test that ControlShuffleLinesModifier shuffles stat...
src.strip()
assert
func_call
tests/bug_gen/procedural/cpp/test_cpp_control_flow.py
test_control_shuffle_lines_modifier
158
null
SWE-bench/SWE-smith
import pytest from swesmith.bug_gen.adapters.rust import get_entities_from_file_rs from swesmith.bug_gen.procedural.rust.operations import ( OperationChangeModifier, OperationFlipOperatorModifier, OperationSwapOperandsModifier, OperationBreakChainsModifier, OperationChangeConstantsModifier, FLIP...
1
assert
numeric_literal
tests/bug_gen/procedural/rust/test_rust_operations.py
test_operation_change_modifier
57
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.notes import ( list_notes, create_note, update_note, delete_note, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestCreateNote: def test...
"My Note"
assert
string_literal
tests/services/test_notes.py
test_successful_creation
TestCreateNote
58
null
jacob-bd/notebooklm-mcp-cli
import pytest import httpx from unittest.mock import Mock, patch from notebooklm_tools.core.retry import ( is_retryable_error, execute_with_retry, retry_on_server_error, DEFAULT_MAX_RETRIES, DEFAULT_BASE_DELAY ) def mock_sleep(): with patch("time.sleep") as mock: yield mock def test_ex...
"success"
assert
string_literal
tests/core/test_retry.py
test_execute_with_retry_success
43
null
jacob-bd/notebooklm-mcp-cli
import os import time import pytest pytestmark = pytest.mark.skipif( not os.environ.get("NOTEBOOKLM_E2E"), reason="E2E tests disabled. Set NOTEBOOKLM_E2E=1 to run." ) def mcp_tools(): """Import all MCP tools and reset client for fresh auth.""" # Reset cached client to pick up fresh auth tokens fro...
"success"
assert
string_literal
tests/test_mcp_e2e.py
test_notebook
54
null
jacob-bd/notebooklm-mcp-cli
import pytest from pathlib import Path class TestNoAuthCLIImports: def test_no_auth_cli_in_base(self): """base.py should import from cdp, not auth_cli.""" import notebooklm_tools.core.base as base source = Path(base.__file__).read_text() assert "from .auth_cli import" not in
source
assert
variable
tests/test_auth_migration.py
test_no_auth_cli_in_base
TestNoAuthCLIImports
85
null
jacob-bd/notebooklm-mcp-cli
import pytest import json from unittest.mock import MagicMock, patch import httpx from notebooklm_tools.core.client import NotebookLMClient, AuthenticationError def mock_client(): cookies = {"SID": "test_sid"} with patch.object(NotebookLMClient, '_refresh_auth_tokens') as mock_refresh: client = Noteboo...
{"status": "ok"}
assert
collection
tests/test_api_client.py
test_auto_retry_on_rpc_error_16
TestNotebookLMClientAuth
104
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.research import ( start_research, poll_research, import_research, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestImportResearch: def test...
3
assert
numeric_literal
tests/services/test_research.py
test_import_all_sources
TestImportResearch
142
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_list_notes_filters_mind_maps(): """Test that list_notes filters out mind maps.""" from notebooklm_tools.core.notes import NotesMixin with patch.object(NotesMixin, '_refresh_auth_tokens'): with patch.object(NotesMixin, '_call_rpc') a...
"note_1"
assert
string_literal
tests/core/test_notes.py
test_list_notes_filters_mind_maps
84
null
jacob-bd/notebooklm-mcp-cli
import pytest import json from unittest.mock import MagicMock, patch import httpx from notebooklm_tools.core.client import NotebookLMClient, AuthenticationError def mock_client(): cookies = {"SID": "test_sid"} with patch.object(NotebookLMClient, '_refresh_auth_tokens') as mock_refresh: client = Noteboo...
"timeout"
assert
string_literal
tests/test_api_client.py
test_add_drive_source_timeout_returns_status
TestNotebookLMClientAuth
231
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.notes import ( list_notes, create_note, update_note, delete_note, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestCreateNote: def test...
"note-new"
assert
string_literal
tests/services/test_notes.py
test_successful_creation
TestCreateNote
57
null
jacob-bd/notebooklm-mcp-cli
import tempfile from pathlib import Path from unittest.mock import Mock, patch, MagicMock import pytest import httpx from notebooklm_tools.core.exceptions import FileValidationError, FileUploadError class TestFileUploadE2E: def test_upload_text_file(self, temp_notebook): """Test uploading a text file (r...
None
assert
none_literal
tests/test_file_upload.py
test_upload_text_file
TestFileUploadE2E
297
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from types import SimpleNamespace from notebooklm_tools.services.notebooks import ( list_notebooks, get_notebook, describe_notebook, create_notebook, rename_notebook, delete_notebook, ) from notebooklm_tools.services.errors import ( ServiceE...
"Fallback"
assert
string_literal
tests/services/test_notebooks.py
test_dataclass_fallback
TestGetNotebook
117
null
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core import constants class TestVideoVerbDefaults: def test_format_default_is_valid(self): assert "explainer" in
constants.VIDEO_FORMATS.names
assert
complex_expr
tests/cli/test_verbs_defaults.py
test_format_default_is_valid
TestVideoVerbDefaults
28
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.chat import query, configure_chat from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestConfigureChat: def test_falsy_result_raises_service_error(self, mock_c...
ServiceError, match="falsy result")
pytest.raises
complex_expr
tests/services/test_chat.py
test_falsy_result_raises_service_error
TestConfigureChat
134
null
jacob-bd/notebooklm-mcp-cli
import json import pytest from unittest.mock import MagicMock, patch from notebooklm_tools.services.studio import ( validate_artifact_type, resolve_code, create_artifact, get_studio_status, rename_artifact, delete_artifact, VALID_ARTIFACT_TYPES, ) from notebooklm_tools.services.errors impo...
"audio"
assert
string_literal
tests/services/test_studio.py
test_create_audio
TestCreateArtifact
93
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.exports import export_artifact, ExportResult from notebooklm_tools.services.errors import ValidationError, ExportError def mock_client(): """Create a mock NotebookLMClient.""" return MagicMock() class TestExportArtifactSuccess: ...
"art-456"
assert
string_literal
tests/services/test_exports.py
test_docs_export_returns_correct_result
TestExportArtifactSuccess
83
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from types import SimpleNamespace from notebooklm_tools.services.notebooks import ( list_notebooks, get_notebook, describe_notebook, create_notebook, rename_notebook, delete_notebook, ) from notebooklm_tools.services.errors import ( ServiceE...
[]
assert
collection
tests/services/test_notebooks.py
test_empty_list
TestListNotebooks
79
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock, AsyncMock from notebooklm_tools.services.downloads import ( validate_artifact_type, validate_output_format, get_default_extension, download_sync, download_async, VALID_ARTIFACT_TYPES, VALID_OUTPUT_FORMATS, ) from notebooklm_tools.services.e...
"json"
assert
string_literal
tests/services/test_downloads.py
test_quiz_default_json
TestGetDefaultExtension
69
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_add_collaborator_uses_correct_rpc(): """Test that add_collaborator calls the correct RPC.""" from notebooklm_tools.core.sharing import SharingMixin with patch.object(SharingMixin, '_refresh_auth_tokens'): with patch.object(Shari...
True
assert
bool_literal
tests/core/test_sharing.py
test_add_collaborator_uses_correct_rpc
81
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from types import SimpleNamespace from notebooklm_tools.services.notebooks import ( list_notebooks, get_notebook, describe_notebook, create_notebook, rename_notebook, delete_notebook, ) from notebooklm_tools.services.errors import ( ServiceE...
3
assert
numeric_literal
tests/services/test_notebooks.py
test_returns_notebooks_with_counts
TestListNotebooks
57
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from dataclasses import dataclass from notebooklm_tools.services.sharing import ( get_share_status, set_public_access, invite_collaborator, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock...
[]
assert
collection
tests/services/test_sharing.py
test_empty_collaborators
TestGetShareStatus
89
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_delete_notebook_uses_correct_rpc(): """Test that delete_notebook calls the correct RPC.""" from notebooklm_tools.core.notebooks import NotebookMixin with patch.object(NotebookMixin, '_refresh_auth_tokens'): with patch.object(Not...
True
assert
bool_literal
tests/core/test_notebooks.py
test_delete_notebook_uses_correct_rpc
100
null
jacob-bd/notebooklm-mcp-cli
import os import shutil from pathlib import Path import pytest from notebooklm_tools.core.client import ArtifactNotReadyError, NotebookLMClient NOTEBOOK_ID = "4085e211-fdb0-4802-b973-b43b9f99b6f7" pytestmark = pytest.mark.skipif( not os.environ.get("NOTEBOOKLM_E2E"), reason="Integration tests disabled. Set ...
0
assert
numeric_literal
tests/test_download_integration.py
test_download_report
TestClientDownloads
56
null
jacob-bd/notebooklm-mcp-cli
import json import pytest from unittest.mock import patch from notebooklm_tools.core.base import BaseClient from notebooklm_tools.core.conversation import ConversationMixin, QueryRejectedError class TestConversationMixinMethods: def test_parse_query_response_handles_empty(self): """Test that _parse_quer...
""
assert
string_literal
tests/core/test_conversation.py
test_parse_query_response_handles_empty
TestConversationMixinMethods
78
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.research import ( start_research, poll_research, import_research, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestPollResearch: def test_c...
1
assert
numeric_literal
tests/services/test_research.py
test_completed_status
TestPollResearch
84
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.notes import ( list_notes, create_note, update_note, delete_note, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestListNotes: def test_...
[]
assert
collection
tests/services/test_notes.py
test_empty_notebook
TestListNotes
41
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from types import SimpleNamespace from notebooklm_tools.services.notebooks import ( list_notebooks, get_notebook, describe_notebook, create_notebook, rename_notebook, delete_notebook, ) from notebooklm_tools.services.errors import ( ServiceE...
2
assert
numeric_literal
tests/services/test_notebooks.py
test_returns_notebooks_with_counts
TestListNotebooks
58
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.notes import ( list_notes, create_note, update_note, delete_note, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestUpdateNote: def test...
ServiceError, match="falsy result")
pytest.raises
complex_expr
tests/services/test_notes.py
test_falsy_result_raises_service_error
TestUpdateNote
128
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.chat import query, configure_chat from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestConfigureChat: def test_invalid_goal_raises_validation_error(self, moc...
ValidationError, match="Invalid goal")
pytest.raises
complex_expr
tests/services/test_chat.py
test_invalid_goal_raises_validation_error
TestConfigureChat
87
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch from notebooklm_tools.core.base import BaseClient from notebooklm_tools.core.research import ResearchMixin class TestResearchMixinImport: def test_research_mixin_import(self): """Test that ResearchMixin can be imported.""" assert ResearchMixin is not...
None
assert
none_literal
tests/core/test_research.py
test_research_mixin_import
TestResearchMixinImport
16
null
jacob-bd/notebooklm-mcp-cli
from notebooklm_tools.core.data_types import ( ConversationTurn, Collaborator, ShareStatus, Notebook, ) def test_share_status(): status = ShareStatus(is_public=True, access_level="public", collaborators=[]) assert status.is_public is
True
assert
bool_literal
tests/core/test_data_types.py
test_share_status
18
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.notes import ( list_notes, create_note, update_note, delete_note, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestListNotes: def test_...
0
assert
numeric_literal
tests/services/test_notes.py
test_empty_notebook
TestListNotes
40
null
jacob-bd/notebooklm-mcp-cli
import json import pytest from unittest.mock import patch from notebooklm_tools.core.base import BaseClient from notebooklm_tools.core.conversation import ConversationMixin, QueryRejectedError class TestConversationMixinMethods: def test_parse_query_response_handles_empty(self): """Test that _parse_quer...
{}
assert
collection
tests/core/test_conversation.py
test_parse_query_response_handles_empty
TestConversationMixinMethods
79
null
jacob-bd/notebooklm-mcp-cli
import os import shutil from pathlib import Path import pytest from notebooklm_tools.core.client import ArtifactNotReadyError, NotebookLMClient NOTEBOOK_ID = "4085e211-fdb0-4802-b973-b43b9f99b6f7" pytestmark = pytest.mark.skipif( not os.environ.get("NOTEBOOKLM_E2E"), reason="Integration tests disabled. Set ...
"success"
assert
string_literal
tests/test_download_integration.py
test_mcp_download_report
TestMCPDownloads
180
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch from notebooklm_tools.core.base import BaseClient from notebooklm_tools.core.research import ResearchMixin class TestResearchMixinMethods: def test_start_research_validates_mode(self): """Test that start_research validates mode parameter.""" mixin = R...
ValueError, match="Invalid mode")
pytest.raises
complex_expr
tests/core/test_research.py
test_start_research_validates_mode
TestResearchMixinMethods
48
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.research import ( start_research, poll_research, import_research, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestStartResearch: def test_...
"fast"
assert
string_literal
tests/services/test_research.py
test_successful_start
TestStartResearch
33
null
jacob-bd/notebooklm-mcp-cli
import os import time import pytest pytestmark = pytest.mark.skipif( not os.environ.get("NOTEBOOKLM_E2E"), reason="E2E tests disabled. Set NOTEBOOKLM_E2E=1 to run." ) def mcp_tools(): """Import all MCP tools and reset client for fresh auth.""" # Reset cached client to pick up fresh auth tokens fro...
result
assert
variable
tests/test_mcp_e2e.py
test_notebook_list
TestMCPNotebookTools
73
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from types import SimpleNamespace from notebooklm_tools.services.notebooks import ( list_notebooks, get_notebook, describe_notebook, create_notebook, rename_notebook, delete_notebook, ) from notebooklm_tools.services.errors import ( ServiceE...
"nb-123"
assert
string_literal
tests/services/test_notebooks.py
test_raw_rpc_list_parsed
TestGetNotebook
105
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from types import SimpleNamespace from notebooklm_tools.services.notebooks import ( list_notebooks, get_notebook, describe_notebook, create_notebook, rename_notebook, delete_notebook, ) from notebooklm_tools.services.errors import ( ServiceE...
"Source B"
assert
string_literal
tests/services/test_notebooks.py
test_raw_rpc_list_parsed
TestGetNotebook
109
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_rpc_constants_exist(): """Test that RPC constants are defined.""" from notebooklm_tools.core.base import BaseClient assert hasattr(BaseClient, 'RPC_CREATE_NOTE') assert hasattr(BaseClient, 'RPC_GET_NOTES') assert hasattr(BaseClient,...
"cFji9"
assert
string_literal
tests/core/test_notes.py
test_rpc_constants_exist
151
null
jacob-bd/notebooklm-mcp-cli
import json import pytest from unittest.mock import MagicMock, patch from notebooklm_tools.services.studio import ( validate_artifact_type, resolve_code, create_artifact, get_studio_status, rename_artifact, delete_artifact, VALID_ARTIFACT_TYPES, ) from notebooklm_tools.services.errors impo...
"art-7"
assert
string_literal
tests/services/test_studio.py
test_create_quiz
TestCreateArtifact
125
null
jacob-bd/notebooklm-mcp-cli
import contextlib import os import time from pathlib import Path import pytest pytestmark = pytest.mark.skipif( not os.environ.get("NOTEBOOKLM_E2E"), reason="E2E tests disabled. Set NOTEBOOKLM_E2E=1 to run." ) def client(): """Create a client with cached credentials.""" from notebooklm_tools.core.aut...
result
assert
variable
tests/test_e2e.py
test_query_notebook
TestQueryOperations
176
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_get_share_status_uses_correct_rpc(): """Test that get_share_status calls the correct RPC.""" from notebooklm_tools.core.sharing import SharingMixin with patch.object(SharingMixin, '_refresh_auth_tokens'): with patch.object(Shari...
"JFMDGd"
assert
string_literal
tests/core/test_sharing.py
test_get_share_status_uses_correct_rpc
47
null
jacob-bd/notebooklm-mcp-cli
import json import pytest from unittest.mock import patch from notebooklm_tools.core.base import BaseClient from notebooklm_tools.core.conversation import ConversationMixin, QueryRejectedError class TestErrorDetection: def _make_mixin(self): return ConversationMixin(cookies={"test": "cookie"}, csrf_toke...
3
assert
numeric_literal
tests/core/test_conversation.py
test_extract_error_simple_code
TestErrorDetection
121
null
jacob-bd/notebooklm-mcp-cli
from notebooklm_tools.core.exceptions import AccountMismatchError, NLMError class TestSaveProfileMismatchGuard: def _create_existing_profile(self, tmp_path: Path, email: str) -> AuthManager: """Helper: create a profile with existing credentials on disk.""" profiles_dir = tmp_path / "profiles" / "t...
None
assert
none_literal
tests/core/test_auth_guard.py
test_save_allows_when_new_email_is_none
TestSaveProfileMismatchGuard
134
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, Mock import sys from notebooklm_tools.cli.formatters import detect_output_format, OutputFormat def test_detect_output_format_quiet_flag(): # Quiet = Compact (unless JSON specified) assert detect_output_format(quiet_flag=True) ==
OutputFormat.COMPACT
assert
complex_expr
tests/cli/test_formatters.py
test_detect_output_format_quiet_flag
23
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.research import ( start_research, poll_research, import_research, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestStartResearch: def test_...
"web"
assert
string_literal
tests/services/test_research.py
test_successful_start
TestStartResearch
32
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock, AsyncMock from notebooklm_tools.services.downloads import ( validate_artifact_type, validate_output_format, get_default_extension, download_sync, download_async, VALID_ARTIFACT_TYPES, VALID_OUTPUT_FORMATS, ) from notebooklm_tools.services.e...
"html"
assert
string_literal
tests/services/test_downloads.py
test_quiz_html
TestGetDefaultExtension
75
null
jacob-bd/notebooklm-mcp-cli
import tempfile from pathlib import Path from unittest.mock import Mock, patch, MagicMock import pytest import httpx from notebooklm_tools.core.exceptions import FileValidationError, FileUploadError class TestAddFileIntegration: def test_add_file_orchestrates_three_steps(self): """Test that add_file cor...
temp_path)
assert_*
variable
tests/test_file_upload.py
test_add_file_orchestrates_three_steps
TestAddFileIntegration
262
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_delete_source_uses_correct_rpc(): """Test that delete_source calls the correct RPC.""" from notebooklm_tools.core.sources import SourceMixin with patch.object(SourceMixin, '_refresh_auth_tokens'): with patch.object(SourceMixin, ...
True
assert
bool_literal
tests/core/test_sources.py
test_delete_source_uses_correct_rpc
85
null
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core.base import BaseClient from notebooklm_tools.core.download import DownloadMixin class TestDownloadMixinImport: def test_download_mixin_import(self): """Test that DownloadMixin can be imported.""" assert DownloadMixin is not
None
assert
none_literal
tests/core/test_download.py
test_download_mixin_import
TestDownloadMixinImport
15
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_list_notebooks_uses_correct_rpc(): """Test that list_notebooks calls the correct RPC.""" from notebooklm_tools.core.notebooks import NotebookMixin with patch.object(NotebookMixin, '_refresh_auth_tokens'): with patch.object(Noteb...
"wXbhsf"
assert
string_literal
tests/core/test_notebooks.py
test_list_notebooks_uses_correct_rpc
59
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch from notebooklm_tools.core.base import BaseClient from notebooklm_tools.core.research import ResearchMixin class TestResearchMixinMethods: def test_parse_research_sources_handles_empty(self): """Test that _parse_research_sources handles empty input.""" ...
[]
assert
collection
tests/core/test_research.py
test_parse_research_sources_handles_empty
TestResearchMixinMethods
64
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.notes import ( list_notes, create_note, update_note, delete_note, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestListNotes: def test_...
"nb-123"
assert
string_literal
tests/services/test_notes.py
test_returns_notes_and_count
TestListNotes
31
null
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core.base import BaseClient from notebooklm_tools.core.studio import StudioMixin class TestStudioMixinImport: def test_studio_mixin_import(self): """Test that StudioMixin can be imported.""" assert StudioMixin is not
None
assert
none_literal
tests/core/test_studio.py
test_studio_mixin_import
TestStudioMixinImport
15
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from dataclasses import dataclass from notebooklm_tools.services.sharing import ( get_share_status, set_public_access, invite_collaborator, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock...
"owner"
assert
string_literal
tests/services/test_sharing.py
test_collaborator_details_preserved
TestGetShareStatus
77
null
jacob-bd/notebooklm-mcp-cli
import pytest import json from unittest.mock import MagicMock, patch import httpx from notebooklm_tools.core.client import NotebookLMClient, AuthenticationError def mock_client(): cookies = {"SID": "test_sid"} with patch.object(NotebookLMClient, '_refresh_auth_tokens') as mock_refresh: client = Noteboo...
result["message"].lower()
assert
func_call
tests/test_api_client.py
test_add_drive_source_timeout_returns_status
TestNotebookLMClientAuth
232
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_delete_note_returns_bool(): """Test that delete_note returns boolean.""" from notebooklm_tools.core.notes import NotesMixin with patch.object(NotesMixin, '_refresh_auth_tokens'): with patch.object(NotesMixin, '_call_rpc') as mock_rp...
True
assert
bool_literal
tests/core/test_notes.py
test_delete_note_returns_bool
122
null
jacob-bd/notebooklm-mcp-cli
import pytest from pathlib import Path class TestCDPModule: def test_run_headless_auth_signature(self): """run_headless_auth should have expected parameters.""" import inspect from notebooklm_tools.utils.cdp import run_headless_auth sig = inspect.signature(run_headless_auth) ...
params
assert
variable
tests/test_auth_migration.py
test_run_headless_auth_signature
TestCDPModule
41
null
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core.base import BaseClient from notebooklm_tools.core.studio import StudioMixin class TestStudioMixinMethods: def test_get_studio_status_is_alias(self): """Test that get_studio_status is an alias for poll_studio_status.""" mixin = StudioMixin(cookies={"test": ...
mixin.get_studio_status.__doc__
assert
complex_expr
tests/core/test_studio.py
test_get_studio_status_is_alias
TestStudioMixinMethods
75
null
jacob-bd/notebooklm-mcp-cli
from unittest.mock import patch, MagicMock import pytest def test_parse_response(): """Test parsing batchexecute response.""" from notebooklm_tools.core.base import BaseClient with patch.object(BaseClient, '_refresh_auth_tokens'): client = BaseClient(cookies={}, csrf_token="token") ...
1
assert
numeric_literal
tests/core/test_base.py
test_parse_response
99
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_set_public_access_uses_correct_rpc(): """Test that set_public_access calls the correct RPC.""" from notebooklm_tools.core.sharing import SharingMixin with patch.object(SharingMixin, '_refresh_auth_tokens'): with patch.object(Sha...
"QDyure"
assert
string_literal
tests/core/test_sharing.py
test_set_public_access_uses_correct_rpc
63
null
jacob-bd/notebooklm-mcp-cli
from notebooklm_tools.core.utils import ( parse_timestamp, extract_cookies_from_chrome_export, RPC_NAMES, ) def test_rpc_names_exists(): assert "wXbhsf" in
RPC_NAMES
assert
variable
tests/core/test_utils.py
test_rpc_names_exists
19
null
jacob-bd/notebooklm-mcp-cli
import pytest from notebooklm_tools.core import constants class TestSlidesVerbDefaults: def test_length_default_is_valid(self): assert "default" in
constants.SLIDE_DECK_LENGTHS.names
assert
complex_expr
tests/cli/test_verbs_defaults.py
test_length_default_is_valid
TestSlidesVerbDefaults
48
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import MagicMock from notebooklm_tools.services.research import ( start_research, poll_research, import_research, ) from notebooklm_tools.services.errors import ValidationError, ServiceError def mock_client(): return MagicMock() class TestImportResearch: def test...
ServiceError, match="not found")
pytest.raises
complex_expr
tests/services/test_research.py
test_no_research_raises_service_error
TestImportResearch
159
null
jacob-bd/notebooklm-mcp-cli
import pytest from unittest.mock import patch, MagicMock def test_rpc_constants_exist(): """Test that RPC constants are defined.""" from notebooklm_tools.core.base import BaseClient assert hasattr(BaseClient, 'RPC_CREATE_NOTE') assert hasattr(BaseClient, 'RPC_GET_NOTES') assert hasattr(BaseClient,...
"cYAfTb"
assert
string_literal
tests/core/test_notes.py
test_rpc_constants_exist
152
null