"""Smoke tests for src/pact/codebase_analyzer.py (auto-generated by pact adopt)."""

import pytest

def test_import_pact_codebase_analyzer():
    """Module imports without error."""
    import importlib
    mod = importlib.import_module("pact.codebase_analyzer")
    assert mod is not None

def test_discover_source_files_is_callable():
    """Function discover_source_files exists and is callable."""
    import importlib
    mod = importlib.import_module("pact.codebase_analyzer")
    fn = getattr(mod, "discover_source_files", None)
    assert fn is not None, "'discover_source_files' not found in pact.codebase_analyzer"
    assert callable(fn)

def test_discover_tests_is_callable():
    """Function discover_tests exists and is callable."""
    import importlib
    mod = importlib.import_module("pact.codebase_analyzer")
    fn = getattr(mod, "discover_tests", None)
    assert fn is not None, "'discover_tests' not found in pact.codebase_analyzer"
    assert callable(fn)

def test_extract_functions_is_callable():
    """Function extract_functions exists and is callable."""
    import importlib
    mod = importlib.import_module("pact.codebase_analyzer")
    fn = getattr(mod, "extract_functions", None)
    assert fn is not None, "'extract_functions' not found in pact.codebase_analyzer"
    assert callable(fn)

def test_compute_complexity_is_callable():
    """Function compute_complexity exists and is callable."""
    import importlib
    mod = importlib.import_module("pact.codebase_analyzer")
    fn = getattr(mod, "compute_complexity", None)
    assert fn is not None, "'compute_complexity' not found in pact.codebase_analyzer"
    assert callable(fn)

def test_map_test_coverage_is_callable():
    """Function map_test_coverage exists and is callable."""
    import importlib
    mod = importlib.import_module("pact.codebase_analyzer")
    fn = getattr(mod, "map_test_coverage", None)
    assert fn is not None, "'map_test_coverage' not found in pact.codebase_analyzer"
    assert callable(fn)

def test_detect_security_patterns_is_callable():
    """Function detect_security_patterns exists and is callable."""
    import importlib
    mod = importlib.import_module("pact.codebase_analyzer")
    fn = getattr(mod, "detect_security_patterns", None)
    assert fn is not None, "'detect_security_patterns' not found in pact.codebase_analyzer"
    assert callable(fn)

def test_analyze_codebase_is_callable():
    """Function analyze_codebase exists and is callable."""
    import importlib
    mod = importlib.import_module("pact.codebase_analyzer")
    fn = getattr(mod, "analyze_codebase", None)
    assert fn is not None, "'analyze_codebase' not found in pact.codebase_analyzer"
    assert callable(fn)
