forked from cleveragents/cleveragents-core
a5de448856
Implements the three-tag TDD bug-capture system in Robot Framework via a Listener v3 module, paralleling the Behave implementation. Tests tagged tdd_expected_fail that fail have their result inverted to PASS (bug still exists); tests that unexpectedly pass are inverted to FAIL with guidance. Addresses all 15 findings from code review (PR !673, reviewer hamza.khyari): P2 fixes: - Added idempotency guard (_processed_tests set) to prevent double-inversion when the listener is loaded twice in the same process. - Rewrote normal-test-unaffected check to run alongside a tdd_expected_fail fixture in a single Robot invocation, proving the listener is loaded and selectively applies rather than being a tautological pass. P3 fixes: - Added output.xml existence guard with clear diagnostics in _run_fixture. - Documented intentional use of data.tags (static definition) vs result.tags (runtime-modifiable) in end_test docstring. - Added SKIP status test fixture and integration test case. - Added message content assertion in cmd_expected_fail_inverted. - Tightened substring assertions to match specific error text. - Added tdd_expected_fail-alone fixture (both companions missing). - Added close() hook to clear _validation_errors and _processed_tests. - Simplified _run_fixture return type to tuple[str, str]. - Changed listener path resolution from CWD-relative to __file__-relative in noxfile.py (integration_tests, slow_integration_tests, e2e_tests). P4 fixes: - Added __all__ declaration to helper module. - Changed module docstring from "mirroring" to "paralleling". - Added comment documenting accepted XML parsing risk (self-generated XML). Additional fixes: - Increased M4 E2E plan-tree test timeout from 30s to 120s (pre-existing timeout failure unrelated to this feature). Quality gates (post-rebase onto latest master): - nox -s lint: PASS - nox -s typecheck: PASS (0 errors) - nox -s unit_tests: PASS (10,700 scenarios) - nox -s integration_tests: PASS (1,505 tests) - nox -s coverage_report: PASS (97.9% >= 97% threshold) - nox -s benchmark: PASS - nox -s docs: PASS - nox -s build: PASS - nox -s security_scan: PASS - nox -s dead_code: PASS ISSUES CLOSED: #628
25 lines
825 B
Python
25 lines
825 B
Python
"""Mock implementations for testing.
|
|
|
|
This package contains mock implementations used only during testing.
|
|
Following the mock placement rule, all mocks must exist only in the
|
|
features/ directory and never in production code (implementation_plan.md).
|
|
"""
|
|
|
|
from .fake_provider import FakeProviderInfo, FakeProviderRegistry
|
|
from .lsp_transport_mock import MockLspTransport, parse_lsp_responses
|
|
from .mock_ai_provider import MockAIProvider
|
|
from .mock_mcp_transport import MockMCPTransport
|
|
from .tdd_test_helpers import make_mock_scenario
|
|
from .transient_fail_audit_service import TransientFailAuditService
|
|
|
|
__all__ = [
|
|
"FakeProviderInfo",
|
|
"FakeProviderRegistry",
|
|
"MockAIProvider",
|
|
"MockLspTransport",
|
|
"MockMCPTransport",
|
|
"TransientFailAuditService",
|
|
"make_mock_scenario",
|
|
"parse_lsp_responses",
|
|
]
|