Test that the class vars are set correctly. Args: test_state: A state.
(test_state)
| 218 | |
| 219 | |
| 220 | def test_base_class_vars(test_state): |
| 221 | """Test that the class vars are set correctly. |
| 222 | |
| 223 | Args: |
| 224 | test_state: A state. |
| 225 | """ |
| 226 | fields = test_state.get_fields() |
| 227 | cls = type(test_state) |
| 228 | |
| 229 | for field in fields: |
| 230 | if field in test_state.get_skip_vars(): |
| 231 | continue |
| 232 | prop = getattr(cls, field) |
| 233 | assert isinstance(prop, BaseVar) |
| 234 | assert prop._var_name == field |
| 235 | |
| 236 | assert cls.num1._var_type == int |
| 237 | assert cls.num2._var_type == float |
| 238 | assert cls.key._var_type == str |
| 239 | |
| 240 | |
| 241 | def test_computed_class_var(test_state): |
nothing calls this directly
no test coverage detected