MCPcopy
hub / github.com/reflex-dev/reflex / test_computed_class_var

Function test_computed_class_var

tests/units/test_state.py:369–378  ·  view source on GitHub ↗

Test that the class computed vars are set correctly. Args: test_state: A state.

(test_state)

Source from the content-addressed store, hash-verified

367
368
369def 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
381def test_class_vars(test_state):

Callers

nothing calls this directly

Calls 1

valuesMethod · 0.80

Tested by

no test coverage detected