Lift more native Python unittest assertions#1631
Conversation
|
Warning Review limit reached
More reviews will be available in 58 minutes and 20 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1763dd6aed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| name = _attr_method_name(call.func) | ||
| if name is None: | ||
| continue | ||
| if not name.startswith("assert"): |
There was a problem hiding this comment.
Limit lift-gap claims to unittest assertions
In pytest tests that use mocks, calls like mock.assert_called_once_with(...) or spy.assert_any_call(...) satisfy this startswith("assert") check even though they are mock-verification APIs, not unittest TestCase assertions. Because the caller then adds the test to claimed_tests without emitting a contract, those tests are no longer left for Layer 0/3 as the README dispatch model describes, so existing mock-heavy pytest tests can be swallowed with only a lift-gap warning. Please gate this path on an actual unittest-style receiver/context (e.g. self.assert... in a TestCase method) rather than any attribute named assert*.
Useful? React with 👍 / 👎.
1763dd6 to
a87bc71
Compare
a87bc71 to
107de4c
Compare
Summary
py-testslifter surface for nativeunittest.TestCaseassertionsassertIsNone,assertIsNotNone,assertTrue, andassertFalseinto normalized contractsVerification
python3 -m pytest implementations/python/provekit-lift-py-tests/tests -qcargo test -p provekit-cli --test cmd_mint_python_project_implications --manifest-path implementations/rust/Cargo.toml python_implication_consumer_mints_bridge_from_manifest_rpc -- --nocapturegit diff --check