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
PyWavelets/pywt
import warnings from copy import deepcopy from itertools import combinations, permutations import numpy as np import pytest from numpy.testing import ( assert_, assert_allclose, assert_array_equal, assert_equal, ) import pywt from pywt._extensions._swt import swt_axis dtypes_in = [np.int8, np.float16...
1)
assert_*
numeric_literal
pywt/tests/test_swt.py
test_swt_max_level
78
null
PyWavelets/pywt
from numpy.testing import assert_allclose, assert_almost_equal import pywt def test_centrfreq(): # db1 is Haar function, frequency=1 w = pywt.Wavelet('db1') expected = 1 result = pywt.central_frequency(w, precision=12) assert_almost_equal(result,
expected)
assert_*
variable
pywt/tests/test_functions.py
test_centrfreq
13
null
PyWavelets/pywt
import warnings from copy import deepcopy from itertools import combinations, permutations import numpy as np import pytest from numpy.testing import ( assert_, assert_allclose, assert_array_equal, assert_equal, ) import pywt from pywt._extensions._swt import swt_axis dtypes_in = [np.int8, np.float16...
4)
assert_*
numeric_literal
pywt/tests/test_swt.py
test_swt_max_level
80
null
PyWavelets/pywt
from itertools import combinations import numpy as np from numpy.testing import assert_, assert_allclose, assert_equal, assert_raises import pywt dtypes_in = [np.int8, np.float16, np.float32, np.float64, np.complex64, np.complex128] dtypes_out = [np.float64, np.float32, np.float32, np.float64, np.comple...
wavelet)
assert_*
variable
pywt/tests/test_multidim.py
test_error_on_invalid_keys
208
null
PyWavelets/pywt
import numpy as np from numpy.testing import assert_, assert_allclose, assert_array_equal, assert_raises import pywt dtypes_in = [np.int8, np.float16, np.float32, np.float64, np.complex64, np.complex128] dtypes_out = [np.float64, np.float32, np.float32, np.float64, np.complex64, np.complex1...
cA1)
assert_*
variable
pywt/tests/test_dwt_idwt.py
test_dwt_single_axis
162
null
PyWavelets/pywt
import warnings from copy import deepcopy from itertools import combinations, permutations import numpy as np import pytest from numpy.testing import ( assert_, assert_allclose, assert_array_equal, assert_equal, ) import pywt from pywt._extensions._swt import swt_axis dtypes_in = [np.int8, np.float16...
X)
assert_*
variable
pywt/tests/test_swt.py
test_swt2_iswt2_non_square
273
null
PyWavelets/pywt
import os import numpy as np from numpy.testing import assert_, assert_allclose, assert_raises import pywt.data data_dir = os.path.join(os.path.dirname(__file__), 'data') wavelab_data_file = os.path.join(data_dir, 'wavelab_test_signals.npz') wavelab_result_dict = np.load(wavelab_data_file) def test_wavelab_signals(...
key)
assert_*
variable
pywt/tests/test_data.py
test_wavelab_signals
72
null
PyWavelets/pywt
import os import pickle import numpy as np from numpy.testing import assert_, assert_allclose import pywt def check_coefficients_orthogonal(wavelet): epsilon = 5e-11 level = 5 w = pywt.Wavelet(wavelet) phi, psi, x = w.wavefun(level=level) # Lowpass filter coefficients sum to sqrt2 res = np....
np.linspace(0, 5, num=x.size))
assert_*
func_call
pywt/tests/test_wavelet.py
test_wavefun_sym3
196
null
PyWavelets/pywt
import numpy as np from numpy.testing import assert_, assert_allclose, assert_raises import pywt def test_downcoef_complex(): rstate = np.random.RandomState(1234) r = rstate.randn(16) + 1j * rstate.randn(16) nlevels = 3 a = pywt.downcoef('a', r, 'haar', level=nlevels) a_ref = pywt.downcoef('a', r....
a_ref)
assert_*
variable
pywt/tests/test__pywt.py
test_downcoef_complex
40
null
PyWavelets/pywt
import warnings from copy import deepcopy from itertools import combinations, permutations import numpy as np import pytest from numpy.testing import ( assert_, assert_allclose, assert_array_equal, assert_equal, ) import pywt from pywt._extensions._swt import swt_axis dtypes_in = [np.int8, np.float16...
0)
assert_*
numeric_literal
pywt/tests/test_swt.py
test_swt_max_level
75
null
PyWavelets/pywt
import numpy as np from numpy.testing import assert_, assert_allclose, assert_array_equal, assert_raises import pywt dtypes_in = [np.int8, np.float16, np.float32, np.float64, np.complex64, np.complex128] dtypes_out = [np.float64, np.float32, np.float32, np.float64, np.complex64, np.complex1...
cwave)
assert_*
variable
pywt/tests/test_dwt_idwt.py
test_error_on_continuous_wavelet
229
null
PyWavelets/pywt
import os import pickle import numpy as np from numpy.testing import assert_, assert_allclose, assert_equal, assert_raises import pywt def test_collecting_nodes(): x = [1, 2, 3, 4, 5, 6, 7, 8] wp = pywt.WaveletPacket(data=x, wavelet='db1', mode='symmetric') # All nodes in natural order assert_([node...
'invalid_order')
assert_*
string_literal
pywt/tests/test_wp.py
test_collecting_nodes
86
null
PyWavelets/pywt
import numpy as np from numpy.testing import assert_, assert_allclose, assert_raises import pywt def test_dwt_max_level(): assert_(pywt.dwt_max_level(16, 2) == 4) assert_(pywt.dwt_max_level(16, 8) == 1) assert_(pywt.dwt_max_level(16, 9) == 1) assert_(pywt.dwt_max_level(16, 10) == 0) assert_(pywt.d...
3.3)
assert_*
numeric_literal
pywt/tests/test__pywt.py
test_dwt_max_level
132
null
PyWavelets/pywt
import numpy as np from numpy.testing import assert_allclose, assert_equal, assert_raises import pywt def test_invalid_modes(): x = np.arange(4) assert_raises(ValueError, pywt.dwt, x, 'db2', 'unknown') assert_raises(ValueError, pywt.dwt, x, 'db2',
-1)
assert_*
numeric_literal
pywt/tests/test_modes.py
test_invalid_modes
19
null
PyWavelets/pywt
import os import pickle import numpy as np from numpy.testing import assert_, assert_allclose, assert_equal, assert_raises import pywt def test_data_reconstruction_2d(): x = np.array([[1, 2, 3, 4, 5, 6, 7, 8]] * 8, dtype=np.float64) wp = pywt.WaveletPacket2D(data=x, wavelet='db1', mode='symmetric') new_...
x)
assert_*
variable
pywt/tests/test_wp2d.py
test_data_reconstruction_2d
127
null
PyWavelets/pywt
import numpy as np from numpy.testing import assert_, assert_allclose, assert_equal, assert_raises import pywt float_dtypes = [np.float32, np.float64, np.complex64, np.complex128] real_dtypes = [np.float32, np.float64] def _sign(x): # Matlab-like sign function (numpy uses a different convention). return x / ...
'greater')
assert_*
string_literal
pywt/tests/test_thresholding.py
test_threshold
84
null
PyWavelets/pywt
import operator from functools import reduce from itertools import product import numpy as np from numpy.testing import assert_, assert_allclose, assert_equal, assert_raises import pywt def test_wavelet_packet_axes(): rstate = np.random.RandomState(0) shape = (32, 16, 8) x = rstate.standard_normal(shape)...
x.dtype)
assert_*
complex_expr
pywt/tests/test_wpnd.py
test_wavelet_packet_axes
165
null
PyWavelets/pywt
import os import pickle from itertools import product import numpy as np import pytest from numpy.testing import ( assert_allclose, assert_almost_equal, assert_equal, assert_raises, ) import pywt def ref_gaus(LB, UB, N, num): X = np.linspace(LB, UB, N) F0 = (2./np.pi)**(1./4.)*np.exp(-(X**2))...
Fc)
assert_*
variable
pywt/tests/test_cwt_wavelets.py
test_shan
162
null
PyWavelets/pywt
import operator from functools import reduce from itertools import product import numpy as np from numpy.testing import assert_, assert_allclose, assert_equal, assert_raises import pywt def test_accessing_node_attributes_nd(): x = np.array([[1, 2, 3, 4, 5, 6, 7, 8]] * 8, dtype=np.float64) wp = pywt.WaveletPa...
np.array([[3., 7., 11., 15.]] * 4))
assert_*
func_call
pywt/tests/test_wpnd.py
test_accessing_node_attributes_nd
54
null
PyWavelets/pywt
import os import pickle import numpy as np from numpy.testing import assert_, assert_allclose import pywt def check_coefficients_orthogonal(wavelet): epsilon = 5e-11 level = 5 w = pywt.Wavelet(wavelet) phi, psi, x = w.wavefun(level=level) # Lowpass filter coefficients sum to sqrt2 res = np....
phi_r_expect)
assert_*
variable
pywt/tests/test_wavelet.py
test_wavefun_bior13
265
null
PyWavelets/pywt
import warnings from copy import deepcopy from itertools import combinations, permutations import numpy as np import pytest from numpy.testing import ( assert_, assert_allclose, assert_array_equal, assert_equal, ) import pywt from pywt._extensions._swt import swt_axis dtypes_in = [np.int8, np.float16...
r)
assert_*
variable
pywt/tests/test_swt.py
test_swtn_iswtn_unique_shape_per_axis
434
null
madviking/headless-pm
import asyncio import os import subprocess import time import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock import sys sys.path.insert(0, str(Path(__file__).parent.parent)) from src.mcp.server import HeadlessPMMCPServer from tests.process_tree_leak_detective import compreh...
""
assert
string_literal
tests/test_fork_bomb_prevention.py
test_environment_protection_variables_set_correctly
TestForkBombPrevention
405
null
madviking/headless-pm
import pytest import asyncio import httpx import subprocess import signal import time import os import tempfile import importlib.util from pathlib import Path from unittest.mock import patch, MagicMock, AsyncMock from sqlmodel import Session, SQLModel, create_engine def engine(): """Create file-based SQLite engine...
6969
assert
numeric_literal
tests/unit/test_mcp_server.py
test_url_parsing
TestMCPServer
102
null
madviking/headless-pm
import os import sys import time import unittest import uuid import asyncio import hashlib import subprocess from datetime import datetime, timedelta from concurrent.futures import ThreadPoolExecutor, as_completed from typing import List, Dict, Any, Set import requests from urllib.parse import urljoin from pathlib impo...
len(feature_configs))
self.assertEqual
func_call
tests/test_headless_pm_client.py
test_project_structure
TestHeadlessPMClient
423
null
madviking/headless-pm
import asyncio import os import subprocess import time import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock import sys sys.path.insert(0, str(Path(__file__).parent.parent)) from src.mcp.server import HeadlessPMMCPServer from tests.process_tree_leak_detective import compreh...
"1"
assert
string_literal
tests/test_fork_bomb_prevention.py
test_environment_protection_variables_set_correctly
TestForkBombPrevention
404
null
madviking/headless-pm
import pytest from datetime import datetime from src.api.schemas import * class TestRequestSchemas: def test_agent_register_request(self): """Test AgentRegisterRequest schema""" data = { "agent_id": "test_agent_001", "role": "backend_dev", "level": "senior", ...
"client"
assert
string_literal
tests/unit/test_schemas.py
test_agent_register_request
TestRequestSchemas
25
null
madviking/headless-pm
import pytest from datetime import datetime from sqlmodel import Session, SQLModel, create_engine from sqlalchemy import text from src.models.models import Agent, Epic, Feature, Task, Document, Service, Mention, TaskEvaluation, Changelog from src.models.enums import TaskStatus, AgentRole, DifficultyLevel, TaskComplexit...
None
assert
none_literal
tests/unit/test_models.py
test_agent_model_creation
TestModels
89
null
madviking/headless-pm
import os import sys import time import unittest import uuid import asyncio import hashlib import subprocess from datetime import datetime, timedelta from concurrent.futures import ThreadPoolExecutor, as_completed from typing import List, Dict, Any, Set import requests from urllib.parse import urljoin from pathlib impo...
list)
self.assertIsInstance
variable
tests/test_headless_pm_client.py
test_agent_management
TestHeadlessPMClient
325
null
madviking/headless-pm
import pytest import asyncio import httpx import subprocess import signal import time import os import tempfile import importlib.util from pathlib import Path from unittest.mock import patch, MagicMock, AsyncMock from sqlmodel import Session, SQLModel, create_engine def engine(): """Create file-based SQLite engine...
0.2
assert
numeric_literal
tests/unit/test_mcp_server.py
test_timeout_handling
TestMCPServerErrorHandling
490
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
set()
assert
func_call
tests/unit/test_services.py
test_extract_mentions_no_matches
TestMentionService
56
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
"down"
assert
string_literal
tests/unit/test_services.py
test_service_status_enum_values
TestHealthChecker
253
null
madviking/headless-pm
import asyncio import os import subprocess import time import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock import sys sys.path.insert(0, str(Path(__file__).parent.parent)) from src.mcp.server import HeadlessPMMCPServer from tests.process_tree_leak_detective import compreh...
False
assert
bool_literal
tests/test_fork_bomb_prevention.py
test_rate_limiting_protection
TestForkBombPrevention
177
null
madviking/headless-pm
import pytest import asyncio import httpx import subprocess import signal import time import os import tempfile import importlib.util from pathlib import Path from unittest.mock import patch, MagicMock, AsyncMock from sqlmodel import Session, SQLModel, create_engine def engine(): """Create file-based SQLite engine...
200
assert
numeric_literal
tests/unit/test_mcp_server.py
test_health_check_logic
TestMCPServer
127
null
madviking/headless-pm
import pytest import psutil import os import socket import time import subprocess from pathlib import Path from typing import Set, Dict, List, Tuple from tests.process_tree_leak_detective import comprehensive_leak_detection def audit_test_isolation(request): """Automatic test isolation audit for every test.""" ...
2
assert
numeric_literal
tests/test_isolation_audit.py
test_no_leakage_example
TestIsolationAudit
128
null
madviking/headless-pm
import pytest import psutil import os import socket import time import subprocess from pathlib import Path from typing import Set, Dict, List, Tuple from tests.process_tree_leak_detective import comprehensive_leak_detection def audit_test_isolation(request): """Automatic test isolation audit for every test.""" ...
0
assert
numeric_literal
tests/test_isolation_audit.py
test_baseline_capture
TestIsolationAudit
122
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
None
assert
none_literal
tests/unit/test_services.py
test_create_mentions_for_document
TestMentionService
114
null
madviking/headless-pm
import pytest import asyncio import httpx import subprocess import signal import sys import time import os import tempfile from pathlib import Path from unittest.mock import patch, MagicMock from fastapi.testclient import TestClient from sqlmodel import Session, SQLModel, create_engine from src.main import app from sr...
200
assert
numeric_literal
tests/test_mcp_autodiscovery.py
test_api_functionality_with_http_client
TestMCPAutoDiscovery
632
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
2
assert
numeric_literal
tests/unit/test_services.py
test_create_mentions_for_document
TestMentionService
107
null
madviking/headless-pm
import pytest import asyncio import httpx import subprocess import signal import time import os import tempfile import importlib.util from pathlib import Path from unittest.mock import patch, MagicMock, AsyncMock from sqlmodel import Session, SQLModel, create_engine def engine(): """Create file-based SQLite engine...
0
assert
numeric_literal
tests/unit/test_mcp_server.py
test_command_discovery
TestMCPServer
88
null
madviking/headless-pm
import pytest import asyncio import httpx import subprocess import signal import time import os import tempfile import importlib.util from pathlib import Path from unittest.mock import patch, MagicMock, AsyncMock from sqlmodel import Session, SQLModel, create_engine def engine(): """Create file-based SQLite engine...
1
assert
numeric_literal
tests/unit/test_mcp_server.py
test_multi_client_safety_cleanup
TestMCPServerErrorHandling
546
null
madviking/headless-pm
import os import sys import time import unittest import uuid import asyncio import hashlib import subprocess from datetime import datetime, timedelta from concurrent.futures import ThreadPoolExecutor, as_completed from typing import List, Dict, Any, Set import requests from urllib.parse import urljoin from pathlib impo...
"All operations should succeed")
self.assertEqual
string_literal
tests/test_headless_pm_client.py
test_parallel_stress_test
TestHeadlessPMClient
764
null
madviking/headless-pm
import pytest from datetime import datetime from sqlmodel import Session, SQLModel, create_engine from sqlalchemy import text from src.models.models import Agent, Epic, Feature, Task, Document, Service, Mention, TaskEvaluation, Changelog from src.models.enums import TaskStatus, AgentRole, DifficultyLevel, TaskComplexit...
"minor"
assert
string_literal
tests/unit/test_models.py
test_task_complexity_enum
TestEnums
60
null
madviking/headless-pm
import asyncio import os import subprocess import time import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock import sys sys.path.insert(0, str(Path(__file__).parent.parent)) from src.mcp.server import HeadlessPMMCPServer from tests.process_tree_leak_detective import compreh...
True
assert
bool_literal
tests/test_fork_bomb_prevention.py
test_client_coordination_prevents_duplicate_apis
TestForkBombPrevention
436
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
0
assert
numeric_literal
tests/unit/test_services.py
test_create_mentions_no_mentions
TestMentionService
200
null
madviking/headless-pm
import os import time from pathlib import Path import sys PROJECT_ROOT = Path(__file__).parent.parent.absolute() sys.path.insert(0, str(PROJECT_ROOT)) from src.utils.process_registry import check_pid_conflict def test_pid_conflict_same_pid_different_type(): """Test that same PID with different type is detected a...
True
assert
bool_literal
tests/test_pid_conflict_edge_cases.py
test_pid_conflict_same_pid_different_type
44
null
madviking/headless-pm
import pytest from datetime import datetime from sqlmodel import Session, SQLModel, create_engine from sqlalchemy import text from src.models.models import Agent, Epic, Feature, Task, Document, Service, Mention, TaskEvaluation, Changelog from src.models.enums import TaskStatus, AgentRole, DifficultyLevel, TaskComplexit...
"pm"
assert
string_literal
tests/unit/test_models.py
test_agent_role_enum
TestEnums
50
null
madviking/headless-pm
import pytest from datetime import datetime from src.api.schemas import * class TestResponseSchemas: def test_service_response(self): """Test ServiceResponse schema""" data = { "id": 1, "service_name": "test-service", "owner_agent_id": "owner", "ping...
"owner"
assert
string_literal
tests/unit/test_schemas.py
test_service_response
TestResponseSchemas
204
null
madviking/headless-pm
import pytest import asyncio import httpx import subprocess import signal import sys import time import os import tempfile from pathlib import Path from unittest.mock import patch, MagicMock from fastapi.testclient import TestClient from sqlmodel import Session, SQLModel, create_engine from src.main import app from sr...
None
assert
none_literal
tests/test_mcp_autodiscovery.py
test_command_discovery
TestMCPAutoDiscovery
385
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
"starting"
assert
string_literal
tests/unit/test_services.py
test_service_status_enum_values
TestHealthChecker
254
null
madviking/headless-pm
import asyncio import os import subprocess import time import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock import sys sys.path.insert(0, str(Path(__file__).parent.parent)) from src.mcp.server import HeadlessPMMCPServer from tests.process_tree_leak_detective import compreh...
3
assert
numeric_literal
tests/test_fork_bomb_prevention.py
test_rate_limiting_state_management
TestForkBombPrevention
306
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
document.id
assert
complex_expr
tests/unit/test_services.py
test_create_mentions_for_document
TestMentionService
112
null
madviking/headless-pm
import pytest from datetime import datetime from sqlmodel import Session, SQLModel, create_engine from sqlalchemy import text from src.models.models import Agent, Epic, Feature, Task, Document, Service, Mention, TaskEvaluation, Changelog from src.models.enums import TaskStatus, AgentRole, DifficultyLevel, TaskComplexit...
8080
assert
numeric_literal
tests/unit/test_models.py
test_service_model_creation
TestModels
325
null
madviking/headless-pm
import asyncio import os import subprocess import time import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock import sys sys.path.insert(0, str(Path(__file__).parent.parent)) from src.mcp.server import HeadlessPMMCPServer from tests.process_tree_leak_detective import compreh...
10
assert
numeric_literal
tests/test_fork_bomb_prevention.py
test_no_fork_bomb_with_real_processes
TestForkBombPrevention
339
null
madviking/headless-pm
import pytest from datetime import datetime from sqlmodel import Session, SQLModel, create_engine from sqlalchemy import text from src.models.models import Agent, Epic, Feature, Task, Document, Service, Mention, TaskEvaluation, Changelog from src.models.enums import TaskStatus, AgentRole, DifficultyLevel, TaskComplexit...
"mcp"
assert
string_literal
tests/unit/test_models.py
test_connection_type_enum
TestEnums
65
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
{"john_doe"}
assert
collection
tests/unit/test_services.py
test_extract_mentions_single
TestMentionService
38
null
madviking/headless-pm
import pytest import asyncio import httpx import subprocess import signal import sys import time import os import tempfile from pathlib import Path from unittest.mock import patch, MagicMock from fastapi.testclient import TestClient from sqlmodel import Session, SQLModel, create_engine from src.main import app from sr...
server_default.base_url
assert
complex_expr
tests/test_mcp_autodiscovery.py
test_service_port_consistency
TestMCPAutoDiscovery
875
null
madviking/headless-pm
import pytest from datetime import datetime from src.api.schemas import * class TestRequestSchemas: def test_task_create_request(self): """Test TaskCreateRequest schema""" data = { "feature_id": 1, "title": "Test Task", "description": "Test task description", ...
"major"
assert
string_literal
tests/unit/test_schemas.py
test_task_create_request
TestRequestSchemas
67
null
madviking/headless-pm
import time import os import pytest import tempfile from fastapi.testclient import TestClient from sqlmodel import Session, SQLModel, create_engine from src.main import app from src.api.dependencies import get_session API_KEY = os.getenv("API_KEY", "XXXXXX") headers = {"X-API-Key": API_KEY} def session_fixture(): ...
200
assert
numeric_literal
tests/test_backend_dev_assignment.py
test_backend_dev_scenarios
154
null
madviking/headless-pm
import pytest import asyncio import httpx import subprocess import signal import sys import time import os import tempfile from pathlib import Path from unittest.mock import patch, MagicMock from fastapi.testclient import TestClient from sqlmodel import Session, SQLModel, create_engine from src.main import app from sr...
server_custom.base_url
assert
complex_expr
tests/test_mcp_autodiscovery.py
test_service_port_consistency
TestMCPAutoDiscovery
880
null
madviking/headless-pm
import pytest import asyncio import httpx import subprocess import signal import time import os import tempfile import importlib.util from pathlib import Path from unittest.mock import patch, MagicMock, AsyncMock from sqlmodel import Session, SQLModel, create_engine def engine(): """Create file-based SQLite engine...
None
assert
none_literal
tests/unit/test_mcp_server.py
test_import_mcp_server
TestMCPServer
75
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
30
assert
numeric_literal
tests/unit/test_services.py
test_health_checker_initialization
TestHealthChecker
210
null
madviking/headless-pm
import pytest from datetime import datetime from src.api.schemas import * class TestRequestSchemas: def test_task_create_request(self): """Test TaskCreateRequest schema""" data = { "feature_id": 1, "title": "Test Task", "description": "Test task description", ...
1
assert
numeric_literal
tests/unit/test_schemas.py
test_task_create_request
TestRequestSchemas
61
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
task.id
assert
complex_expr
tests/unit/test_services.py
test_create_mentions_for_task
TestMentionService
166
null
madviking/headless-pm
import pytest from datetime import datetime from src.api.schemas import * class TestRequestSchemas: def test_agent_register_request(self): """Test AgentRegisterRequest schema""" data = { "agent_id": "test_agent_001", "role": "backend_dev", "level": "senior", ...
"senior"
assert
string_literal
tests/unit/test_schemas.py
test_agent_register_request
TestRequestSchemas
24
null
madviking/headless-pm
import asyncio import os import subprocess import time import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock import sys sys.path.insert(0, str(Path(__file__).parent.parent)) from src.mcp.server import HeadlessPMMCPServer from tests.process_tree_leak_detective import compreh...
1.0
assert
numeric_literal
tests/test_fork_bomb_prevention.py
test_process_creation_time_validation
TestForkBombPrevention
466
null
madviking/headless-pm
import pytest from datetime import datetime from src.api.schemas import * class TestRequestSchemas: def test_document_create_request(self): """Test DocumentCreateRequest schema""" data = { "doc_type": "update", "title": "Test Document", "content": "This is test ...
"update"
assert
string_literal
tests/unit/test_schemas.py
test_document_create_request
TestRequestSchemas
89
null
madviking/headless-pm
import os import sys import time import unittest import uuid import asyncio import hashlib import subprocess from datetime import datetime, timedelta from concurrent.futures import ThreadPoolExecutor, as_completed from typing import List, Dict, Any, Set import requests from urllib.parse import urljoin from pathlib impo...
str(result).lower())
self.assertIn
func_call
tests/test_headless_pm_client.py
test_agent_management
TestHeadlessPMClient
338
null
madviking/headless-pm
import pytest from datetime import datetime from sqlmodel import Session, SQLModel, create_engine from sqlalchemy import text from src.models.models import Agent, Epic, Feature, Task, Document, Service, Mention, TaskEvaluation, Changelog from src.models.enums import TaskStatus, AgentRole, DifficultyLevel, TaskComplexit...
"qa"
assert
string_literal
tests/unit/test_models.py
test_agent_role_enum
TestEnums
48
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
False
assert
bool_literal
tests/unit/test_services.py
test_health_checker_initialization
TestHealthChecker
211
null
madviking/headless-pm
import pytest from datetime import datetime from src.api.schemas import * class TestValidation: def test_empty_string_validation(self): """Test validation with empty strings""" # Empty strings are actually allowed in these schemas request = EpicCreateRequest( name="", # Empty ...
""
assert
string_literal
tests/unit/test_schemas.py
test_empty_string_validation
TestValidation
258
null
madviking/headless-pm
import pytest import tempfile import os from datetime import datetime, timedelta from sqlmodel import Session, select, SQLModel, create_engine from src.models.models import Agent, Task, Epic, Feature from src.models.enums import TaskStatus, AgentRole, DifficultyLevel, TaskComplexity from src.services.task_service impo...
inactive_agent.id
assert
complex_expr
tests/test_task_assignment_fix.py
test_stale_lock_cleanup_function
235
null
madviking/headless-pm
import asyncio import os import subprocess import time import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock import sys sys.path.insert(0, str(Path(__file__).parent.parent)) from src.mcp.server import HeadlessPMMCPServer from tests.process_tree_leak_detective import compreh...
None
assert
none_literal
tests/test_fork_bomb_prevention.py
test_windows_file_locking_timeout
TestForkBombPrevention
506
null
madviking/headless-pm
import pytest import asyncio import httpx import subprocess import signal import time import os import tempfile import importlib.util from pathlib import Path from unittest.mock import patch, MagicMock, AsyncMock from sqlmodel import Session, SQLModel, create_engine def engine(): """Create file-based SQLite engine...
"1"
assert
string_literal
tests/unit/test_mcp_server.py
test_environment_variable_hierarchy
TestMCPServerIntegration
439
null
madviking/headless-pm
import pytest from datetime import datetime from sqlmodel import Session, SQLModel, create_engine from sqlalchemy import text from src.models.models import Agent, Epic, Feature, Task, Document, Service, Mention, TaskEvaluation, Changelog from src.models.enums import TaskStatus, AgentRole, DifficultyLevel, TaskComplexit...
True
assert
bool_literal
tests/unit/test_models.py
test_task_evaluation_model_creation
TestModels
416
null
madviking/headless-pm
import time import os import pytest import tempfile from fastapi.testclient import TestClient from sqlmodel import Session, SQLModel, create_engine from src.main import app from src.api.dependencies import get_session API_KEY = os.getenv("API_KEY", "XXXXXX") headers = {"X-API-Key": API_KEY} def session_fixture(): ...
elapsed
assert
variable
tests/test_backend_dev_assignment.py
test_backend_dev_scenarios
192
null
madviking/headless-pm
import pytest import tempfile import os from datetime import datetime, timedelta from sqlmodel import Session, select, SQLModel, create_engine from src.models.models import Agent, Task, Epic, Feature from src.models.enums import TaskStatus, AgentRole, DifficultyLevel, TaskComplexity from src.services.task_service impo...
active_agent.id
assert
complex_expr
tests/test_task_assignment_fix.py
test_stale_lock_cleanup_function
234
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
agent.agent_id
assert
complex_expr
tests/unit/test_services.py
test_create_mentions_for_document
TestMentionService
113
null
madviking/headless-pm
import os import sys import time import unittest import uuid import asyncio import hashlib import subprocess from datetime import datetime, timedelta from concurrent.futures import ThreadPoolExecutor, as_completed from typing import List, Dict, Any, Set import requests from urllib.parse import urljoin from pathlib impo...
agent_ids)
self.assertIn
variable
tests/test_headless_pm_client.py
test_agent_management
TestHeadlessPMClient
330
null
madviking/headless-pm
import pytest from sqlmodel import Session, SQLModel, create_engine from src.services.mention_service import extract_mentions, create_mentions_for_document, create_mentions_for_task from src.services.health_checker import ServiceHealthChecker from src.models.models import Agent, Document, Task, Feature, Epic, Mention, ...
ServiceStatus.DOWN
assert
complex_expr
tests/unit/test_services.py
test_health_checker_service_status_update
TestHealthChecker
248
null
madviking/headless-pm
import time import os import pytest import tempfile from fastapi.testclient import TestClient from sqlmodel import Session, SQLModel, create_engine from src.main import app from src.api.dependencies import get_session API_KEY = os.getenv("API_KEY", "XXXXXX") headers = {"X-API-Key": API_KEY} def session_fixture(): ...
None
assert
none_literal
tests/test_backend_dev_assignment.py
test_backend_dev_scenarios
117
null
madviking/headless-pm
import os import sys import time import unittest import uuid import asyncio import hashlib import subprocess from datetime import datetime, timedelta from concurrent.futures import ThreadPoolExecutor, as_completed from typing import List, Dict, Any, Set import requests from urllib.parse import urljoin from pathlib impo...
"Should have at least one mention")
self.assertGreater
string_literal
tests/test_headless_pm_client.py
test_document_system
TestHeadlessPMClient
604
null
madviking/headless-pm
import pytest from datetime import datetime from src.api.schemas import * class TestRequestSchemas: def test_service_register_request(self): """Test ServiceRegisterRequest schema""" data = { "service_name": "test-service", "ping_url": "http://localhost:8080/health", ...
8080
assert
numeric_literal
tests/unit/test_schemas.py
test_service_register_request
TestRequestSchemas
104
null
madviking/headless-pm
import pytest import os from sqlmodel import Session, SQLModel, create_engine from src.models.database import get_database_url, get_session, engine, create_db_and_tables class TestDatabase: def test_engine_exists(self): """Test that engine is created""" assert engine is not
None
assert
none_literal
tests/unit/test_database.py
test_engine_exists
TestDatabase
76
null
madviking/headless-pm
import pytest import json import tempfile import os from datetime import datetime from unittest.mock import patch from fastapi.testclient import TestClient from sqlmodel import Session, SQLModel, create_engine from src.main import app from src.api.dependencies import get_session from src.models.models import Agent, Epi...
2
assert
numeric_literal
tests/unit/test_api_routes.py
test_list_agents
TestAgentRoutes
147
null
madviking/headless-pm
import os import sys import time import unittest import uuid import asyncio import hashlib import subprocess from datetime import datetime, timedelta from concurrent.futures import ThreadPoolExecutor, as_completed from typing import List, Dict, Any, Set import requests from urllib.parse import urljoin from pathlib impo...
context)
self.assertIn
variable
tests/test_headless_pm_client.py
test_context_endpoint
TestHeadlessPMClient
715
null
madviking/headless-pm
import os import sys import time import unittest import uuid import asyncio import hashlib import subprocess from datetime import datetime, timedelta from concurrent.futures import ThreadPoolExecutor, as_completed from typing import List, Dict, Any, Set import requests from urllib.parse import urljoin from pathlib impo...
doc_id)
self.assertEqual
variable
tests/test_headless_pm_client.py
test_document_system
TestHeadlessPMClient
590
null
madviking/headless-pm
import pytest import json import tempfile import os from datetime import datetime from unittest.mock import patch from fastapi.testclient import TestClient from sqlmodel import Session, SQLModel, create_engine from src.main import app from src.api.dependencies import get_session from src.models.models import Agent, Epi...
2.0
assert
numeric_literal
tests/unit/test_api_routes.py
test_get_next_task_with_waiting
TestTaskRoutes
340
null
madviking/headless-pm
import pytest import asyncio import httpx import subprocess import signal import sys import time import os import tempfile from pathlib import Path from unittest.mock import patch, MagicMock from fastapi.testclient import TestClient from sqlmodel import Session, SQLModel, create_engine from src.main import app from sr...
0
assert
numeric_literal
tests/test_mcp_autodiscovery.py
test_command_discovery
TestMCPAutoDiscovery
387
null
madviking/headless-pm
import pytest import json import tempfile import os from datetime import datetime from unittest.mock import patch from fastapi.testclient import TestClient from sqlmodel import Session, SQLModel, create_engine from src.main import app from src.api.dependencies import get_session from src.models.models import Agent, Epi...
200
assert
numeric_literal
tests/unit/test_api_routes.py
test_register_agent
TestAgentRoutes
102
null
SmileyChris/django-countries
import inspect import pytest from django.contrib import admin from django.contrib.admin.views.main import ChangeList from django.contrib.auth.models import AnonymousUser from django.test import TestCase from django.test.client import RequestFactory from django_countries import countries, filters from django_countries...
choice["selected"])
self.assertTrue
complex_expr
django_countries/tests/test_admin_filters.py
test_choices_related_field
TestRelatedCountryFilter
377
null
SmileyChris/django-countries
from django.db import models from django.test import TestCase from rest_framework import serializers from django_countries.fields import Country, CountryField from django_countries.serializers import CountryFieldMixin from django_countries.tests.models import AllowNull class TestDRFSerializerAllowNull(TestCase): ...
"US")
self.assertEqual
string_literal
django_countries/tests/test_null_support.py
test_serializer_with_value
TestDRFSerializerAllowNull
265
null
SmileyChris/django-countries
import inspect import pytest from django.contrib import admin from django.contrib.admin.views.main import ChangeList from django.contrib.auth.models import AnonymousUser from django.test import TestCase from django.test.client import RequestFactory from django_countries import countries, filters from django_countries...
["contact__country"])
self.assertEqual
collection
django_countries/tests/test_admin_filters.py
test_expected_parameters
TestRelatedCountryFilter
359
null
SmileyChris/django-countries
from unittest import mock from urllib import parse as urlparse from django.forms.models import modelform_factory from django.test import TestCase, override_settings from django.utils import safestring from django.utils.html import escape from django_countries import countries, fields, widgets from django_countries.co...
output)
self.assertIn
variable
django_countries/tests/test_widgets.py
test_render_escaping
TestCountrySelectWidget
61
null
SmileyChris/django-countries
from django.contrib.admin.utils import display_for_field from django.test import TestCase from django_countries.tests import models class TestMultipleCountryAdminDisplay(TestCase): def test_display_for_field_empty_countries(self): """Test that empty multiple country fields display properly.""" mu...
["", "-"])
self.assertIn
collection
django_countries/tests/test_admin_display.py
test_display_for_field_empty_countries
TestMultipleCountryAdminDisplay
63
null
SmileyChris/django-countries
import pytest from django.test import TestCase from django.utils import translation from django_countries import Countries, countries, countries_context from django_countries.conf import settings class TestCountriesContext(BaseTest): def test_context_with_first_repeat(self): """Test that context can over...
2)
self.assertEqual
numeric_literal
django_countries/tests/test_dynamic_first.py
test_context_with_first_repeat
TestCountriesContext
303
null
SmileyChris/django-countries
from django.contrib.admin.utils import display_for_field from django.test import TestCase from django_countries.tests import models class TestMultipleCountryAdminDisplay(TestCase): def test_multiple_countries_descriptor_list_behavior(self): """Test that MultipleCountriesDescriptor acts like a list.""" ...
repr_str)
self.assertIn
variable
django_countries/tests/test_admin_display.py
test_multiple_countries_descriptor_list_behavior
TestMultipleCountryAdminDisplay
109
null
SmileyChris/django-countries
import pytest from django.test import TestCase from django.utils import translation from django_countries import Countries, countries, countries_context from django_countries.conf import settings class TestCountriesFirstByLanguage(BaseTest): def test_underscore_locale_format(self): """Test that fr_CA for...
"FR")
self.assertEqual
string_literal
django_countries/tests/test_dynamic_first.py
test_underscore_locale_format
TestCountriesFirstByLanguage
117
null
SmileyChris/django-countries
import pytest from django.template import Context, Template from django.test import TestCase from django.utils import translation from django_countries import countries from django_countries.conf import settings class TestCountriesTags(TestCase): TEMPLATE_COUNTRY = Template( "{% load countries %}{% get_co...
"Brasil")
self.assertEqual
string_literal
django_countries/tests/test_tags.py
test_country_name_translated
TestCountriesTags
33
null
SmileyChris/django-countries
import pickle from unittest import mock from unittest.case import skipUnless import django import pytest from django.core import checks, validators from django.core.files.temp import NamedTemporaryFile from django.core.management import call_command from django.db import models from django.forms import Select from dja...
0)
self.assertEqual
numeric_literal
django_countries/tests/test_fields.py
test_len
TestCountryField
230
null
SmileyChris/django-countries
from unittest import mock from urllib import parse as urlparse from django.forms.models import modelform_factory from django.test import TestCase, override_settings from django.utils import safestring from django.utils.html import escape from django_countries import countries, fields, widgets from django_countries.co...
widget.is_hidden)
self.assertFalse
complex_expr
django_countries/tests/test_widgets.py
test_lazy_select_use_required_attribute_when_hidden
TestDefaultSelectWidget
155
null