Repository navigation
[Klaud Cold] Move infx tests from utils/ to infx/tests/ - #3486
Conversation
Removes the eight utils/ shims that nothing but their own legacy-entrypoint tests and docs still used: aggregate_power, aggregate_power_multinode, calc_success_rate, collect_eval_results, collect_results, find_reusable_sweep_run, recover_failed_ingest and validate_reusable_sweep_artifacts. Their tests now run the infx modules directly, and docs point at python -m infx.<module>. Shims that workflows, scripts, infx code or tests still use are kept. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Move 44 test files whose subject is an infx.* module from utils/ into a top-level tests/ directory mirroring the infx package layout. Tests that exercise scripts/modules still in benchmarks/, runners/, or utils/ stay where they are. Path fixes: parents[N] depth, with_name() shim reference, bare evals.kimi_vendor_eval import -> infx.evals.kimi_vendor_eval, removed stale sys.path.insert calls. CI, docs/testing.md, docs/testing_zh.md, and docs/configuration-procedures*.md updated to collect from tests/. Co-Authored-By: Claude Opus 4.6 <[email protected]>
# Conflicts: # tests/results/power/test_aggregate_power.py # tests/results/test_collect_eval_results.py # tests/workflows/test_validate_reusable_sweep_artifacts.py
…ical name tests/workflows/test_validate_perf_changelog.py monkeypatched the bare validate_perf_changelog module, which only resolved while utils/changelog_gate_tests/conftest.py put utils/ on sys.path; running tests/ alone failed. Patch infx.workflows.validate_perf_changelog directly. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Tests of infx live beside the package. Repo-root depths gain one level, ruff excludes infx/tests (tests keep the repository test style), and the wheel excludes it via wheel-exclude so installs ship no test code. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
Looks good — this is a clean, well-executed test relocation with correctly adjusted path-depth logic and import fixes.
What was reviewed: the git-mv renames (verified several via git diff against old+new paths to confirm true renames, not new files), the non-mechanical fixes called out in the description (test_generate_sweep_configs.py's absolute-path shim lookup, test_collect_eval_results.py's infx.evals.* imports, test_validate_perf_changelog.py's patch target switched to infx.workflows.validate_perf_changelog), tests/pytest.ini vs utils/pytest.ini, and ci.yml's updated pytest invocation. Also checked for stray references to old test paths — none found outside the expected exception — and confirmed utils/changelog_gate_tests/conftest.py is still needed for the test that remains there.
Extended reasoning...
Pure test-relocation PR: 45 test files moved from utils/ to a new tests/ tree via git mv, plus small depth/import fixes, a new tests/pytest.ini, and doc/CI path updates. No production code paths (auth, crypto, data handling) are touched; the surface is entirely test infrastructure and CI config. Spot-checked several renamed files' actual diffs (not just the stat summary) and the described non-mechanical fixes, all matched the PR description exactly, and a repo-wide search found no leftover references to old test paths.
This review covers commit 729fb73, which is no longer the latest commit on this pull request; later commits are not covered by it.
Summary
Moves the tests for
infx/code out ofutils/intoinfx/tests/, mirroring theinfx/package layout (tests live beside the code they test). 45 files moved withgit mv(history preserved).infx/tests/results/power/infx/tests/results/agentic/infx/tests/results/infx/tests/datasets/infx/tests/workflows/infx/tests/evals/infx/tests/matrix/infx/tests/bench_serving/infx/tests/srt_slurm/infx/tests/klaud/infx/tests/golden_al_distribution/infx/tests/Stayed in
utils/(their subject is not ininfx/):test_amd_sglang_cli.py(benchmarks/multi_node/amd_utils),test_inject_srt_power_concurrencies.py(runners/),test_srt_fixed_sequence.py(benchmarks shell),changelog_gate_tests/test_merge_with_reuse.py(utils/merge_with_reuse.sh),agentic/aggregation/test_power_lifecycle.pyandevals/test_run_eval_dispatch.py(benchmarks/benchmark_lib.sh).Non-mechanical fixes
Path(__file__).parents[N]) adjusted for every moved file;test_generate_sweep_configs.pynow locates the keptutils/matrix_logic/generate_sweep_configs.pyshim by absolute path.test_collect_eval_results.pyimportsinfx.evals.{kimi_vendor_eval,minimax_provider_eval}instead of the bareevals.*shim modules; four eval tests drop their now-pointlesssys.path.insert(utils/evals).test_validate_perf_changelog.pypatched the barevalidate_perf_changelogmodule, which only resolved becauseutils/changelog_gate_tests/conftest.pypututils/onsys.pathfor the whole session — runningtests/alone failed. It now patchesinfx.workflows.validate_perf_changelog.infx/tests/pytest.inimirrorsutils/pytest.ini(pythonpath = ../..) sopytest infx/tests/...works standalone.infx/ruff.tomlexcludestests(the package'sselect = ["ALL"]ruleset is for library code), andpyproject.tomlsetswheel-exclude = ["infx/tests"]: the built wheel ships 0 test files and still includes the 11 golden curves.ci.yml) now runspython -m pytest infx/tests/ utils/ runners/ ...;docs/testing*.mdanddocs/configuration-procedures*.mdpoint at the new paths.Test plan
infx/tests/ utils/ runners/ --ignore=utils/srt-slurm, CI extras): 1871 collected, 1851 passed, 6 skipped; the only 14 failures aretest_pool_launcher_*(macOS bash 3 lacksmapfile) — identical toutils/onorigin/main(1851 passed, same 14).pytest infx/tests/alone: 1698 passed, same 14 macOS-only failures.ruff check infx/ruff format --check infxclean; wheel contents checked; no stale references to old test paths outsideperf-changelog.yaml.🤖 Generated with Claude Code