Skip to content

test(pyamber): add unit tests for customized_queue inner-class decorators - #4782

Merged
aglinxinyuan merged 2 commits into
apache:mainfrom
Yicong-Huang:test-pyamber-inner
May 3, 2026
Merged

aglinxinyuan merged 2 commits into
apache:mainfrom
Yicong-Huang:test-pyamber-inner

Conversation

@Yicong-Huang

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Adds pytest coverage for amber/src/main/python/core/util/customized_queue/inner.py. The vendored @inner / @static_inner / @class_inner decorator family used by LinkedBlockingMultiQueue had no dedicated spec.

Any related issues, documentation, discussions?

Closes #4779.

How was this PR tested?

cd amber/src/main/python
ruff check core/util/customized_queue/test_inner.py
ruff format --check core/util/customized_queue/test_inner.py
python -m pytest core/util/customized_queue/test_inner.py

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-opus-4-7)

@codecov-commenter

codecov-commenter commented May 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.60%. Comparing base (9e8ddfc) to head (d74d0f1).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4782      +/-   ##
============================================
+ Coverage     43.49%   43.60%   +0.10%     
- Complexity     2072     2082      +10     
============================================
  Files           957      957              
  Lines         34077    34077              
  Branches       3753     3753              
============================================
+ Hits          14821    14858      +37     
+ Misses        18457    18422      -35     
+ Partials        799      797       -2     
Flag Coverage Δ
amber 41.94% <ø> (+0.09%) ⬆️
python 85.92% <ø> (+0.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aglinxinyuan
aglinxinyuan requested a review from Copilot May 3, 2026 02:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a focused pytest spec for the vendored @inner / @static_inner / @class_inner decorators used by PyAmber’s customized queue implementation (notably LinkedBlockingMultiQueue), closing the gap described in #4779.

Changes:

  • Introduces unit tests covering raw_inner passthrough behavior.
  • Adds tests for static_inner owner wiring at class-definition time.
  • Adds tests for class_inner descriptor-method rejection, carried inheritance, and inner instance/property/cached_property binding semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aglinxinyuan
aglinxinyuan enabled auto-merge (squash) May 3, 2026 04:17
@aglinxinyuan
aglinxinyuan merged commit d65745b into apache:main May 3, 2026
15 checks passed
@Yicong-Huang
Yicong-Huang deleted the test-pyamber-inner branch June 15, 2026 06:46
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
…tors (apache#4782)

### What changes were proposed in this PR?

Adds pytest coverage for
`amber/src/main/python/core/util/customized_queue/inner.py`. The
vendored `@inner` / `@static_inner` / `@class_inner` decorator family
used by `LinkedBlockingMultiQueue` had no dedicated spec.

### Any related issues, documentation, discussions?

Closes apache#4779.

### How was this PR tested?

```
cd amber/src/main/python
ruff check core/util/customized_queue/test_inner.py
ruff format --check core/util/customized_queue/test_inner.py
python -m pytest core/util/customized_queue/test_inner.py
```

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-opus-4-7)

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit tests for pyamber customized_queue inner-class decorators

4 participants