Skip to content

test(sdk): filter bench-related deprecations in S2 acceptance tests (refs basilica-backend#661)#485

Merged
epappas merged 1 commit into
mainfrom
fix/661-bench-test-cross-deprecation
May 18, 2026
Merged

test(sdk): filter bench-related deprecations in S2 acceptance tests (refs basilica-backend#661)#485
epappas merged 1 commit into
mainfrom
fix/661-bench-test-cross-deprecation

Conversation

@epappas
Copy link
Copy Markdown
Contributor

@epappas epappas commented May 18, 2026

Summary

Test-only correctness patch following S1 + S2 PRs landing in sequence:

  • TestBenchBoolAcceptance.test_bench_true_accepted_without_warning
  • TestBenchBoolAcceptance.test_bench_false_accepted_without_warning

asserted "NO DeprecationWarning fires when bench=True / bench=False". After SDK-S1 (PR #484) merged, BasilicaClient.deploy_distributed emits its own DeprecationWarning pointing at the @basilica.distributed decorator, which trips those assertions even though the bench parameter itself is not deprecated.

This patch narrows the assertions to bench-related deprecations only (\"bench\" in str(message).lower()), preserving the S2 contract while tolerating the unrelated S1 method-level deprecation.

Why

S1 and S2 are independent simplifications that both deprecate parts of the existing distributed surface. S2 came first in branch creation order; S1 merged immediately after S2 and added the method-level deprecation. The S2 tests over-asserted by checking for ANY deprecation rather than ONLY bench-related ones.

Test plan

  • pytest tests/test_bench_bool_simplification.py — 22/22 passing post-merge
  • pytest tests/test_bench_status_skipped.py — 18/18 passing (regression check)
  • No production code change

Cross-ref

…refs basilica-backend#661)

After SDK-S1 (PR #484) merged, BasilicaClient.deploy_distributed emits
its own DeprecationWarning pointing at the @basilica.distributed
decorator. The S2 tests in TestBenchBoolAcceptance asserted "NO
DeprecationWarning fires when bench=True / bench=False", which the
S1 method-level deprecation now trips even though the bench parameter
itself is not deprecated.

Narrow the assertions to bench-related deprecations only:

    bench_deprecations = [
        w for w in recorded
        if issubclass(w.category, DeprecationWarning)
        and "bench" in str(w.message).lower()
    ]
    assert bench_deprecations == []

This preserves the S2 contract (bench=True/False must not be
flagged as deprecated by the S2 helper) while tolerating the
S1 method-level deprecation.

No production code change; test-only correctness fix.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 18, 2026

Warning

Rate limit exceeded

@epappas has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 49 minutes and 5 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f902b578-d913-400d-89c1-c44e4a209905

📥 Commits

Reviewing files that changed from the base of the PR and between 0860a99 and e006f50.

📒 Files selected for processing (1)
  • crates/basilica-sdk-python/tests/test_bench_bool_simplification.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/661-bench-test-cross-deprecation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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