Skip to content

Comments

test: integration tests for ab_run and optimize_instruction#9

Merged
sbroenne merged 1 commit intomainfrom
fix/integration-tests-for-v0.2.0
Feb 19, 2026
Merged

test: integration tests for ab_run and optimize_instruction#9
sbroenne merged 1 commit intomainfrom
fix/integration-tests-for-v0.2.0

Conversation

@sbroenne
Copy link
Owner

Adds the integration tests that should have been in v0.2.0.

Tests added

tests/test_ab_run.py (4 tests — all passing, 94s)

  • Returns two CopilotResult objects
  • Creates isolated baseline/ and treatment/ dirs under tmp_path
  • Produces measurable differential output (docstring A/B — baseline none, treatment has them)
  • CopilotResult.working_directory points to the correct isolated dir

tests/test_optimizer_integration.py (3 tests — auto-skipped without OPENAI_API_KEY)

  • Returns InstructionSuggestion with non-empty fields
  • str() is human-readable
  • Suggestion addresses the given criterion

Verified locally

  • ab_run: 4/4 pass against real Copilot
  • optimizer: 3 skipped (no OPENAI_API_KEY in local env)

- tests/test_ab_run.py: 4 integration tests covering
  - returns two CopilotResult objects
  - creates isolated baseline/ and treatment/ directories
  - produces differential output (docstring A/B test)
  - working_directory on result points to correct isolated dir

- tests/test_optimizer_integration.py: 3 tests (auto-skipped without
  OPENAI_API_KEY) covering
  - returns valid InstructionSuggestion with non-empty fields
  - str() is human-readable
  - suggestion addresses the given criterion

All 4 ab_run tests pass (94s); optimizer tests skip without API key.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@sbroenne sbroenne merged commit 3ab4850 into main Feb 19, 2026
15 checks passed
@sbroenne sbroenne deleted the fix/integration-tests-for-v0.2.0 branch February 19, 2026 10:32
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