Skip to content

[hipFile/Python] Add missing fake async classes/functions - #8953

Merged
derobins merged 1 commit into
developfrom
users/rildixon/hipfile-python-add-async-fake
Jul 22, 2026
Merged

[hipFile/Python] Add missing fake async classes/functions#8953
derobins merged 1 commit into
developfrom
users/rildixon/hipfile-python-add-async-fake

Conversation

@riley-dixon

@riley-dixon riley-dixon commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Motivation

The hipFile Python test suite has been broken at collection since the async I/O
bindings (#7386): that PR added AsyncIOHandle and the async/stream callables to
the extension and imported them in file.py, but never updated the fake in
conftest.py. Every test importing hipfile errored during collection. Missed
because CI wasn't re-run after the unit tests (#8725) landed.

Technical Details

Add the missing async names to the fake extension in conftest.py: a
_FakeAsyncIOHandle stand-in plus success-shaped hipFileReadAsync /
hipFileWriteAsync / hipFileStreamRegister / hipFileStreamDeregister /
supports_async. Tests-only change.

Issue Tracking

JIRA ID: AIHIPFILE-171

Test Plan

  • Run the hipFile Python binding suite: pytest projects/hipfile/python/tests/.
  • Lint the changed file: black --check and pylint on conftest.py.

Test Result

  • 42 passed (previously: 5 collection errors, suite could not run).
  • black --check: file left unchanged. pylint: rated 10.00/10.

Submission Checklist

@therock-pr-bot

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ❌ Fail Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: projects/hipfile/python/tests/conftest.py; no test file found
🔎 pre-commit ⏳ Pending ⏳ Still running…
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled

⚠️ 1 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ Unit Test

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ Unit Test

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

@riley-dixon

Copy link
Copy Markdown
Contributor Author

Ignore @therock-pr-bot . conftest.py is a test file...

@riley-dixon
riley-dixon marked this pull request as ready for review July 21, 2026 17:15
@riley-dixon
riley-dixon requested a review from a team as a code owner July 21, 2026 17:15
Copilot AI review requested due to automatic review settings July 21, 2026 17:15
The Async Python API was added after the initial unit tests were
merged, but the Async PR (#7386) did not add any unit tests itself.

This quick fix addresses the import issue faced. Actual unit tests
for async will be added at a later point.

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

Fixes the hipFile Python test suite failing at collection by updating the tests’ fake hipfile._hipfile module to include the async API symbols that hipfile/file.py imports at module load.

Changes:

  • Add a _FakeAsyncIOHandle stand-in for the extension’s AsyncIOHandle.
  • Add fake async/stream functions (hipFileReadAsync, hipFileWriteAsync, hipFileStreamRegister, hipFileStreamDeregister) and supports_async() to the fake module.

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

Comment thread projects/hipfile/python/tests/conftest.py
Comment thread projects/hipfile/python/tests/conftest.py
@riley-dixon
riley-dixon force-pushed the users/rildixon/hipfile-python-add-async-fake branch from 0053503 to 584c930 Compare July 21, 2026 17:20
@derobins
derobins merged commit 5284381 into develop Jul 22, 2026
1088 of 1141 checks passed
@derobins
derobins deleted the users/rildixon/hipfile-python-add-async-fake branch July 22, 2026 21:30
systems-assistant Bot pushed a commit to ROCm/hipFile that referenced this pull request Jul 22, 2026
 (#8953)

## Motivation

The hipFile Python test suite has been broken at collection since the
async I/O
bindings (#7386): that PR added `AsyncIOHandle` and the async/stream
callables to
the extension and imported them in `file.py`, but never updated the fake
in
`conftest.py`. Every test importing `hipfile` errored during collection.
Missed
because CI wasn't re-run after the unit tests (#8725) landed.

## Technical Details

Add the missing async names to the fake extension in `conftest.py`: a
`_FakeAsyncIOHandle` stand-in plus success-shaped `hipFileReadAsync` /
`hipFileWriteAsync` / `hipFileStreamRegister` /
`hipFileStreamDeregister` /
`supports_async`. Tests-only change.

## Issue Tracking

JIRA ID: AIHIPFILE-171

## Test Plan

- Run the hipFile Python binding suite: `pytest
projects/hipfile/python/tests/`.
- Lint the changed file: `black --check` and `pylint` on `conftest.py`.

## Test Result

- `42 passed` (previously: 5 collection errors, suite could not run).
- `black --check`: file left unchanged. `pylint`: rated 10.00/10.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.
[rocm-systems] ROCm/rocm-systems#8953 (commit 5284381)
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.

4 participants