reflex/tests/units
Masen Furer a2243190ff
[ENG-4326] Async ComputedVar (#4711)
* WiP

* Save the var from get_var_name

* flatten StateManagerRedis.get_state algorithm

simplify fetching of states and avoid repeatedly fetching the same state

* Get all the states in a single redis round-trip

* update docstrings in StateManagerRedis

* Move computed var dep tracking to separate module

* Fix pre-commit issues

* ComputedVar.add_dependency: explicitly dependency declaration

Allow var dependencies to be added at runtime, for example, when defining a
ComponentState that depends on vars that cannot be known statically.

Fix more pyright issues.

* Fix/ignore more pyright issues from recent merge

* handle cleaning out _potentially_dirty_states on reload

* ignore accessed attributes missing on state class

these might be added dynamically later in which case we recompute the
dependency tracking dicts... if not, they'll blow up anyway at runtime.

* fix playwright tests, which insist on running an asyncio loop

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2025-01-31 16:33:30 -08:00
..
assets removing deprecated features for 0.7.0 and removing py3.9 support (#4586) 2025-01-22 11:54:37 -08:00
compiler enable PGH, bump pyright and fix all #type: ignore (#4699) 2025-01-28 13:11:05 -08:00
components improve var base typing (#4718) 2025-01-31 13:12:33 -08:00
middleware rename private fields with leading underscore in App (#4642) 2025-01-23 15:28:56 +01:00
states enable PGH, bump pyright and fix all #type: ignore (#4699) 2025-01-28 13:11:05 -08:00
utils enable PGH, bump pyright and fix all #type: ignore (#4699) 2025-01-28 13:11:05 -08:00
vars make object var handle all mapping instead of just dict (#4602) 2025-01-21 13:14:02 -08:00
__init__.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
conftest.py enable PGH, bump pyright and fix all #type: ignore (#4699) 2025-01-28 13:11:05 -08:00
test_app.py [ENG-4326] Async ComputedVar (#4711) 2025-01-31 16:33:30 -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 enable PGH, bump pyright and fix all #type: ignore (#4699) 2025-01-28 13:11:05 -08:00
test_db_config.py Support python 3.13 (#4206) 2024-12-12 00:10:51 -08:00
test_event.py var_data fixes with hooks values (#4717) 2025-01-31 13:07:51 -08:00
test_health_endpoint.py enable PGH, bump pyright and fix all #type: ignore (#4699) 2025-01-28 13:11:05 -08:00
test_model.py enable PGH, bump pyright and fix all #type: ignore (#4699) 2025-01-28 13:11:05 -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 PGH, bump pyright and fix all #type: ignore (#4699) 2025-01-28 13:11:05 -08:00
test_route.py rename private fields with leading underscore in App (#4642) 2025-01-23 15:28:56 +01:00
test_sqlalchemy.py enable PGH, bump pyright and fix all #type: ignore (#4699) 2025-01-28 13:11:05 -08:00
test_state_tree.py rename private fields with leading underscore in App (#4642) 2025-01-23 15:28:56 +01:00
test_state.py [ENG-4326] Async ComputedVar (#4711) 2025-01-31 16:33:30 -08:00
test_style.py followup for merge style PR (#4721) 2025-01-31 11:17:46 -08:00
test_telemetry.py add ERA rules to detect commented out code (#4472) 2024-12-11 18:26:44 -08:00
test_testing.py rename private fields with leading underscore in App (#4642) 2025-01-23 15:28:56 +01:00
test_var.py [ENG-4326] Async ComputedVar (#4711) 2025-01-31 16:33:30 -08:00