mirror of
https://github.com/open-mmlab/mmengine.git
synced 2025-06-03 21:54:44 +08:00
14 lines
312 B
Python
14 lines
312 B
Python
# Copyright (c) OpenMMLab. All rights reserved.
|
|
from unittest.mock import Mock
|
|
|
|
from mmengine.hooks import SyncBuffersHook
|
|
|
|
|
|
class TestSyncBuffersHook:
|
|
|
|
def test_sync_buffers_hook(self):
|
|
runner = Mock()
|
|
runner.model = Mock()
|
|
hook = SyncBuffersHook()
|
|
hook._after_epoch(runner)
|