Skip to content

Add env var coverage to wrapper tests#7

Merged
jianliang00 merged 1 commit into
mainfrom
codex/add-test-cases-for-environment-variables
Jan 7, 2026
Merged

Add env var coverage to wrapper tests#7
jianliang00 merged 1 commit into
mainfrom
codex/add-test-cases-for-environment-variables

Conversation

@jianliang00

Copy link
Copy Markdown
Owner

Motivation

  • Ensure the wrapper honors and correctly processes all relevant environment variables.
  • Prevent regressions around venv selection, dependency installation, and logging behavior.
  • Provide reproducible, automated checks for new environment knobs like PYWRAP_PIP_ARGS and PYWRAP_LOCK_POLL_SEC.

Description

  • Added helper methods _run_wrapper and _venv_dir and imported json to tests/test_wrapper.py to simplify invoking the wrapper and inspecting the venv.
  • Added tests for verbose logging and dep mode selection, custom requirements override via PYWRAP_REQUIREMENTS, cache-mode directory via PYWRAP_CACHE_DIR, force recreation via PYWRAP_FORCE_RECREATE, and pip args handling via PYWRAP_PIP_ARGS.
  • Extended the lock timeout test to set PYWRAP_LOCK_POLL_SEC for faster polling during the timeout scenario.

Testing

  • Ran python -m unittest tests.test_wrapper which executed the test suite.
  • All tests passed (OK, 8 tests run).

Codex Task

@jianliang00 jianliang00 merged commit 4868cca into main Jan 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant