Skip to content

Commit 0719b71

Browse files
author
weijinqian
committed
handle clean code
Signed-off-by: weijinqian_v1 <weijinqian@huawei.com>
1 parent e281f2e commit 0719b71

File tree

3 files changed

+372
-442
lines changed

3 files changed

+372
-442
lines changed

tests/ut/test_token_dispatcher.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@
1515
# limitations under the License.
1616
# This file is a part of the vllm-ascend project.
1717

18-
import pytest
1918
import unittest
19+
20+
import pytest
2021
from pytest_mock import MockerFixture
2122

2223
from vllm_ascend.ops.moe_dispatcher.token_dispatcher import (
2324
MoEAlltoAllSeqOverLapDispatcher, MoEDispatcherConfig)
2425
from vllm_ascend.utils import adapt_patch # noqa E402
2526

26-
import vllm_ascend.patch.worker.patch_common.patch_utils # type: ignore[import] # isort: skip # noqa
27-
28-
27+
import vllm_ascend.patch.worker.patch_common.patch_utils # type: ignore[import] # isort: skip # noqa
2928

3029
adapt_patch(True)
3130

@@ -61,7 +60,8 @@ def dispatcher(self, config, mocker: MockerFixture):
6160
return MoEAlltoAllSeqOverLapDispatcher(config)
6261

6362
def test_initialization(self, dispatcher, config):
64-
self.assertEqual(dispatcher.num_local_experts, config.num_local_experts)
63+
self.assertEqual(dispatcher.num_local_experts,
64+
config.num_local_experts)
6565
self.assertEqual(dispatcher.num_experts, config.num_moe_experts)
6666
self.assertEqual(dispatcher.local_expert_indices, [0, 1])
6767
self.assertEqual(dispatcher.ep_rank, 0)

0 commit comments

Comments
 (0)