发布

  • test: delete script-style placeholder test_custom_context.py (#4244)

    frostbyte_neo 发布于 2026-05-24 20:21:28 +00:00

    This file (tests/feature_tests/test_custom_context.py, 165 lines, 1
    test function) is a script-style placeholder that:

    1. Defines modify_llm_creation() which uses hardcoded values
      (context_window_size = 8192, max_tokens = 30000) instead of
      actually calling LDR's LLM creation code.
    2. Iterates registered providers, logs verbose output, and asserts
      only test_succeeded = "error" not in result — where result is
      the hardcoded dict from modify_llm_creation. Since
      modify_llm_creation never errors, the assertion is always True.
    3. Has a __main__ block at the bottom for ad-hoc invocation, which
      is a script-style anti-pattern in a pytest test file.
    4. Per PUNCHLIST.md Tier 1, marked DELETE: "Whole test is a script
      with logger.info calls; only assertion is assert test_succeeded
      inside a loop where succeeded is 'error not in result'."

    The intent was apparently to simulate the fix for issue #241 (custom
    context window size), but the test patches settings then never reads
    them — modify_llm_creation uses local constants throughout. The
    "simulation" tests nothing in LDR's code.

    The companion IMPLEMENTATION_GUIDE_241.md remains in tests/feature_tests/
    for historical reference.

    下载附件