Skip to content

[codex] Fix fusion test subprocess environment - #2623

Open
lintool wants to merge 1 commit into
masterfrom
codex/fix-fusion-test-subprocess
Open

[codex] Fix fusion test subprocess environment#2623
lintool wants to merge 1 commit into
masterfrom
codex/fix-fusion-test-subprocess

Conversation

@lintool

@lintool lintool commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace unchecked os.system(...) fusion invocations with subprocess.run(..., check=True).
  • Invoke pyserini.fusion with sys.executable so subprocesses use the same Python environment as the running test.
  • Move the downloaded COVID fusion fixtures into a temporary directory under tmp/ and use download_url plus gzip extraction instead of root-level wget/gunzip side effects.
  • Add a small helper for simple fusion test subprocess calls.

Root Cause

The old test used bare python, which could resolve outside the active test environment. In this workspace it resolved to Homebrew Python 3.11 instead of pyserini-dev3; that subprocess failed on missing dependencies, but os.system hid the error and the test surfaced only as a failed TREC-file comparison.

Validation

  • mamba run -n pyserini-dev3 python -m py_compile tests/core/test_fusion.py
  • mamba run -n pyserini-dev3 python -c "<smoke simple fusion tests>"
  • mamba run -n pyserini-dev3 python -c "<smoke complex COVID fusion test>"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant