MCPcopy Index your code
hub / github.com/wechaty/python-wechaty / test_accessory_read_initialized_class

Function test_accessory_read_initialized_class

tests/accessory_test.py:102–121  ·  view source on GitHub ↗

should read excepted value by reading static wechaty & puppet after init

(
        user_class: Type[Accessory],
)

Source from the content-addressed store, hash-verified

100
101
102def test_accessory_read_initialized_class(
103 user_class: Type[Accessory],
104) -> None:
105 """
106 should read excepted value by reading static wechaty & puppet after init
107 """
108
109 # reveal_type(accessory_class.wechaty)
110
111 user_class.set_puppet(EXPECTED_PUPPET1)
112 user_class.set_wechaty(EXPECTED_WECHATY1)
113
114 accessory_instance = user_class()
115
116 assert \
117 accessory_instance.puppet == EXPECTED_PUPPET1, \
118 'should get puppet back by instance from static'
119 assert \
120 accessory_instance.wechaty == EXPECTED_WECHATY1, \
121 'should get wechaty back by instance from static'
122
123
124def test_accessory_read_uninitialized_instance(

Callers

nothing calls this directly

Calls 2

set_puppetMethod · 0.80
set_wechatyMethod · 0.80

Tested by

no test coverage detected