test(sdk): filter bench-related deprecations in S2 acceptance tests (refs basilica-backend#661)#485
Conversation
…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.
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
Test-only correctness patch following S1 + S2 PRs landing in sequence:
TestBenchBoolAcceptance.test_bench_true_accepted_without_warningTestBenchBoolAcceptance.test_bench_false_accepted_without_warningasserted "NO
DeprecationWarningfires whenbench=True/bench=False". After SDK-S1 (PR #484) merged,BasilicaClient.deploy_distributedemits its ownDeprecationWarningpointing at the@basilica.distributeddecorator, 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-mergepytest tests/test_bench_status_skipped.py— 18/18 passing (regression check)Cross-ref