reflex/tests/units
Masen Furer 8477a1aba0
BaseState.get_var_value helper to get a value from a Var (#4553)
* BaseState.get_var_value helper to get a value from a Var

When given a state Var or a LiteralVar, retrieve the actual value associated
with the Var.

For state Vars, the returned value is directly tied to the associated state and
can be modified.

Modifying LiteralVar values or ComputedVar values will have no useful effect.

* Use Var[VAR_TYPE] annotation to take advantage of generics

This requires rx.Field to pass typing where used.

* Add case where get_var_value gets something that's not a var
2025-01-03 15:49:46 -08:00
..
assets rx._x.asset improvements (#3624) 2024-11-21 17:16:43 -08:00
compiler stop ignoring some lint rules (#4311) 2024-11-06 13:32:31 -08:00
components add codespell to pre-commit (#4559) 2024-12-20 17:04:39 -08:00
middleware reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
states enable PTH rule (#4476) 2024-12-13 14:06:26 -08:00
utils add codespell to pre-commit (#4559) 2024-12-20 17:04:39 -08:00
vars improve object var symantics (#4290) 2024-11-05 09:56:10 -08:00
__init__.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
conftest.py enable REFURB rules in ruff (#4466) 2024-12-10 09:52:03 -08:00
test_app.py add ERA rules to detect commented out code (#4472) 2024-12-11 18:26:44 -08:00
test_attribute_access_type.py fix: handle default_factory in get_attribute_access_type (#4517) 2024-12-11 18:22:31 -08:00
test_base.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_config.py More env var cleanup (#4248) 2024-11-05 12:25:13 -08:00
test_db_config.py Support python 3.13 (#4206) 2024-12-12 00:10:51 -08:00
test_event.py add ERA rules to detect commented out code (#4472) 2024-12-11 18:26:44 -08:00
test_health_endpoint.py fix health check and skip not needed tasks (#4563) 2024-12-20 17:08:10 -08:00
test_model.py style: prefer type() over __class__ (#4512) 2024-12-10 12:35:46 -08:00
test_page.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_prerequisites.py enable PTH rule (#4476) 2024-12-13 14:06:26 -08:00
test_route.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_sqlalchemy.py add ERA rules to detect commented out code (#4472) 2024-12-11 18:26:44 -08:00
test_state_tree.py add workflow to check dependencies on release branch (#4050) 2024-10-07 20:57:02 +02:00
test_state.py BaseState.get_var_value helper to get a value from a Var (#4553) 2025-01-03 15:49:46 -08:00
test_style.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_telemetry.py add ERA rules to detect commented out code (#4472) 2024-12-11 18:26:44 -08:00
test_testing.py improve app_src typing (#4324) 2024-11-07 14:08:37 -08:00
test_var.py add codespell to pre-commit (#4559) 2024-12-20 17:04:39 -08:00