Skip to content

Conversation

@gcanlin
Copy link
Contributor

@gcanlin gcanlin commented Oct 24, 2025

What this PR does / why we need it?

Enable the unit tests that #3612 skipped.

Does this PR introduce any user-facing change?

How was this patch tested?

Unit tests.

…lization tests

Signed-off-by: gcanlin <canlinguosdu@gmail.com>
@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly adds a missing mock for get_ascend_config to several NPUWorker initialization tests, which is a good fix. However, the setup for this new mock is duplicated across three test methods. To improve maintainability, this duplicated code should be refactored into a common helper method or moved to the setUp method of the test class.

Comment on lines +66 to +68
mock_ascend_config = MagicMock()
mock_ascend_config.enable_cpu_binding = False
mock_get_ascend_config.return_value = mock_ascend_config
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This mock setup logic is duplicated in test_init_npu_worker_with_trust_remote_code (lines 129-131) and test_init_npu_worker_with_custom_cache_dtype (lines 174-176). To improve maintainability and avoid future inconsistencies, consider extracting this logic into a helper method within the TestNPUWorker class and calling it from each of these tests.

@wangxiyuan wangxiyuan merged commit 8295136 into vllm-project:main Oct 25, 2025
22 checks passed
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.

2 participants