should read excepted value by reading static wechaty & puppet after init
(
user_class: Type[Accessory],
)
| 100 | |
| 101 | |
| 102 | def 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 | |
| 124 | def test_accessory_read_uninitialized_instance( |
nothing calls this directly
no test coverage detected