mirror of
https://github.com/open-mmlab/mmrazor.git
synced 2025-06-03 15:02:54 +08:00
19 lines
428 B
Python
19 lines
428 B
Python
|
# Copyright (c) OpenMMLab. All rights reserved.
|
||
|
import unittest
|
||
|
|
||
|
import pytest
|
||
|
|
||
|
from mmrazor.utils import get_placeholder
|
||
|
|
||
|
|
||
|
class TestPlaceholder(unittest.TestCase):
|
||
|
|
||
|
def test_placeholder(self):
|
||
|
holder = get_placeholder('test')
|
||
|
with pytest.raises(ImportError):
|
||
|
holder()
|
||
|
with pytest.raises(ImportError):
|
||
|
holder.a
|
||
|
with pytest.raises(ImportError):
|
||
|
holder.a()
|