Skip to content

Commit dfa55af

Browse files
acailicclaude
andcommitted
fix: resolve CI failure (imports) — use patch.object for causal_analysis to avoid circular import on Python 3.10
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e17f1db commit dfa55af

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_feature_1_why_button.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import pytest
1515

16-
import collector.causal_analysis # noqa: F401 — ensure submodule accessible for patch() on Python 3.10
16+
import collector.causal_analysis as _causal_analysis # noqa: F401
1717

1818
# =============================================================================
1919
# Custom Exceptions (module-level as specified)
@@ -482,7 +482,7 @@ def test_circular_parent_chain_detected(self, make_error_event):
482482
class TestFailureExplainerIntegration:
483483
"""Tests that verify FailureExplainer behavior with mocked dependencies."""
484484

485-
@patch("collector.causal_analysis.CausalAnalyzer")
485+
@patch.object(_causal_analysis, "CausalAnalyzer")
486486
def test_explainer_uses_causal_analyzer_for_chain_traversal(
487487
self,
488488
mock_analyzer_class,

0 commit comments

Comments
 (0)