Skip to content

fix(cli): repair broken test_migrate_reports in test_config.py - #73630

Closed
webtecnica wants to merge 2 commits into
NousResearch:mainfrom
webtecnica:fix/broken-config-test
Closed

fix(cli): repair broken test_migrate_reports in test_config.py#73630
webtecnica wants to merge 2 commits into
NousResearch:mainfrom
webtecnica:fix/broken-config-test

Conversation

@webtecnica

Copy link
Copy Markdown
Contributor

Closes #73144

The test_migrate_reports_normalized_line_formatting test failed when run
as part of the full tests/hermes_cli/ suite due to a stale import reference.

Root cause: the test module's top-level import (from hermes_cli.config import
migrate_config at line 21) was captured while migrate_config was temporarily
patched by a prior test's session-scoped or module-scoped fixture. When the
test ran, it called the patched (no-op) version instead of the real function,
so the print() inside migrate_config never executed.

Fix: re-import migrate_config inside the test method with a local alias,
bypassing the stale top-level reference and always getting the current
module attribute.

Closes NousResearch#73144
@alt-glitch alt-glitch added type/test Test coverage or test infrastructure comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels Jul 28, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for investigating the order-dependent test failure. This is now redundant because the underlying module-identity leak has already been fixed on main.

@teknium1 teknium1 closed this Jul 30, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main type/test Test coverage or test infrastructure

Projects

None yet

3 participants