Test that the class computed vars are set correctly. Args: test_state: A state.
(test_state)
| 367 | |
| 368 | |
| 369 | def test_computed_class_var(test_state): |
| 370 | """Test that the class computed vars are set correctly. |
| 371 | |
| 372 | Args: |
| 373 | test_state: A state. |
| 374 | """ |
| 375 | cls = type(test_state) |
| 376 | vars = [(prop._js_expr, prop._var_type) for prop in cls.computed_vars.values()] |
| 377 | assert ("sum" + FIELD_MARKER, float) in vars |
| 378 | assert ("upper" + FIELD_MARKER, str) in vars |
| 379 | |
| 380 | |
| 381 | def test_class_vars(test_state): |