Skip to content

Update tests for new Python embed API#6

Merged
xqiu merged 3 commits intomainfrom
codex/fix-and-add-unit-tests-for-new-api
Nov 11, 2025
Merged

Update tests for new Python embed API#6
xqiu merged 3 commits intomainfrom
codex/fix-and-add-unit-tests-for-new-api

Conversation

@xqiu
Copy link
Owner

@xqiu xqiu commented Nov 11, 2025

Summary

  • update existing tests to match the new RunProcess delegate signature and ensure virtual environment variables are asserted
  • add coverage for the InstallPackagesAsync helper including validation and index handling
  • exercise InstallTorchWithCudaAsync for both CUDA overrides and detection failures

Testing

  • not run (dotnet CLI is unavailable in the execution environment)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ 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".

xqiu added 2 commits November 11, 2025 13:25
Modified `InstallTorchWithCudaAsync` test to assert a result of `0` instead of `-1`. Removed checks for non-empty errors and absence of `RunProcessCalls`. No changes made to the `CreateTempDirectory` method.
The `DetectCudaTag` method in `PythonEmbedManager` was changed from `private` to `protected virtual` to allow overriding in derived classes.

Updated the `InstallTorchWithCudaAsync` test in `PythonEmbedManagerTests`:
- Changed the expected result from `0` to `-1`.
- Added assertions to verify that `errors` is not empty and `RunProcessCalls` is empty.

Added a test-specific override of `DetectCudaTag` in `RecordingPythonEmbedManager` that always returns `null` asynchronously.
@xqiu xqiu merged commit f3f87b4 into main Nov 11, 2025
1 check passed
@xqiu xqiu deleted the codex/fix-and-add-unit-tests-for-new-api branch November 11, 2025 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant