Commit 7ba2934
[BugFix]fix backend ut (vllm-project#9805)
### What this PR does / why we need it?
This PR fixes the backend unit tests in
`tests/ut/distributed/ascend_store/test_backend.py`.
Recently, new attributes (such as `_lazy_init`, `_store_initialized`,
`_is_a2`, `_registered_buffers`, and `_buffers_registered`) were added
to `MooncakeBackend` and `MemcacheBackend` to support lazy
initialization and buffer registration.
Since the unit tests construct these backend instances using `__new__`
(bypassing `__init__`), these attributes were missing on the mocked
instances, causing unit test failures. This PR explicitly initializes
these attributes on the mocked backend instances to fix the tests.
- vLLM version: v0.20.2
- vLLM main: vllm-project/vllm@39910f2
---------
Signed-off-by: 房建伟 <fangjianwei@fangjianweideMacBook-Air.local>
Co-authored-by: 房建伟 <fangjianwei@fangjianweideMacBook-Air.local>1 parent 2577671 commit 7ba2934
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
259 | 262 | | |
260 | 263 | | |
261 | 264 | | |
| |||
413 | 416 | | |
414 | 417 | | |
415 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
416 | 425 | | |
417 | 426 | | |
418 | 427 | | |
| |||
0 commit comments