Skip to content

test: make the three platform-dependent unit tests portable - #574

Merged
jiangkuaixue123 merged 1 commit into
vllm-project:mainfrom
Pingzii:fix/windows-unit-failures
Nov 13, 2026
Merged

jiangkuaixue123 merged 1 commit into
vllm-project:mainfrom
Pingzii:fix/windows-unit-failures

Conversation

@Pingzii

@Pingzii Pingzii commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Three unit tests fail on Windows for reasons unrelated to what they check:

  • tests/unit/compat/npu/test_ascend_config_lifecycle.py reads a source file with Path.read_text() and no encoding, so the GBK locale decodes UTF-8 bytes and raises UnicodeDecodeError; both reads now state UTF-8.
  • tests/unit/package/test_cam_async_build.py builds its manifest file list with native separators while setuptools works on posix manifest paths, so every required entry misses; the list now uses as_posix().
  • tests/unit/package/test_package.py needs installation metadata to find the vllm.general_plugins entry point, which a source tree does not have; it now skips with that reason, and still checks the entry point when the distribution is installed.

No production code changes. With these, full tests/unit on a Windows CPU host with torch and no vLLM is 900 passed / 89 skipped / 0 failed (previously 8 failed).
Where these come from, for review context:

None of the three involves the transports in #506; the tests are older than that branch.
On verification scope: this PR's checks are label, pre-commit and DCO -- none of them installs the plugin or runs pytest. The numbers above come from a local run on this branch; the entry-point test exercising an installed build is therefore not covered by CI, before or after this change.

They failed on Windows for reasons unrelated to what they check:

- `test_ascend_config_lifecycle.py` parsed a source file through
  `Path.read_text()` without an encoding, so the GBK locale decoded UTF-8 bytes
  and raised; both reads now state UTF-8.
- the source-distribution manifest test built its file list with native
  separators while setuptools works on posix manifest paths, so every required
  entry missed; the list is built with `as_posix()`.
- the entry-point test needs installation metadata, which a source tree does not
  have, so it now skips with that reason instead of asserting on an empty list.
  It still checks the entry point on an installed distribution.

Signed-off-by: 宋元盟 <songyuanmeng2@huawei.com>
@github-actions github-actions Bot added the Ascend Ascend NPU platform and related changes label Nov 12, 2026
@jiangkuaixue123
jiangkuaixue123 merged commit 6497657 into vllm-project:main Nov 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ascend Ascend NPU platform and related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants