MCPcopy Create free account
hub / github.com/modelscope/modelscope / test_list

Method test_list

tests/utils/test_registry.py:55–67  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53 self.assertEqual(len(MODELS.modules), 4)
54
55 def test_list(self):
56 MODELS = Registry('models')
57
58 @MODELS.register_module(Tasks.image_classification, 'SwinT')
59 class SwinTForCls(object):
60 pass
61
62 @MODELS.register_module(Tasks.sentiment_analysis, 'Bert')
63 class BertForSentimentAnalysis(object):
64 pass
65
66 MODELS.list()
67 print(MODELS)
68
69 def test_build(self):
70 MODELS = Registry('models')

Callers

nothing calls this directly

Calls 3

listMethod · 0.95
RegistryClass · 0.90
printFunction · 0.85

Tested by

no test coverage detected