reflex/tests/units
Masen Furer c460040040
LiteralEventChainVar becomes an ArgsFunctionOperation (#4174)
* LiteralEventChainVar becomes an ArgsFunctionOperation

Instead of using the ArgsFunctionOperation to create the string representation
of the _js_expr, make the identity of the var an ArgsFunctionOperation so the
_args_names and _return_expr remain accessible.

Rely on the default behavior of ArgsFunctionOperation to create the
_cached_var_name / _js_expr value.

This allows the compat shim in `format_event_chain` to remain functional, as it
does special handling for ArgsFunctionOperation to retain the previous behavior
of that function (this was a regression introduced in 0.6.2).

* _var_type is EventChain; fix parent class order

* Re-fix LiteralEventChainVar inheritence list w/ comment

* [ENG-3942] LiteralEventVar becomes VarCallOperation

instead of using `.call` when constructing the `_js_expr`, have the identity of
a LiteralEventVar as a VarCallOperation to take advantage of the _var_data
carrying.

* add event overlords

* EventCallback descriptor always returns EventSpec from class

Relax actual `__get__` definition to support the multitude of overloads

* test case for event related vars carrying _var_data

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2024-10-16 15:14:58 -07:00
..
compiler use pathlib as much as possible (#3967) 2024-10-03 17:50:39 +02:00
components Support aria and data props (#4149) 2024-10-14 08:45:25 -07:00
experimental reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
middleware reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
states reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
utils Do not auto-determine generic args if already supplied (#4148) 2024-10-11 17:08:39 -07:00
vars Do not auto-determine generic args if already supplied (#4148) 2024-10-11 17:08:39 -07:00
__init__.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
conftest.py add workflow to check dependencies on release branch (#4050) 2024-10-07 20:57:02 +02:00
test_app.py add type hinting to events (#4145) 2024-10-14 08:44:31 -07:00
test_attribute_access_type.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_base.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_config.py use pathlib as much as possible (#3967) 2024-10-03 17:50:39 +02:00
test_db_config.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_event.py LiteralEventChainVar becomes an ArgsFunctionOperation (#4174) 2024-10-16 15:14:58 -07:00
test_health_endpoint.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_model.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_page.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_prerequisites.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_route.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_sqlalchemy.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02: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 Handle rx.State subclasses defined in function (#4129) 2024-10-11 16:51:10 -07:00
test_style.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_telemetry.py use pathlib as much as possible (#3967) 2024-10-03 17:50:39 +02:00
test_testing.py reorganize all tests in a single top folder (#3981) 2024-09-26 01:22:52 +02:00
test_var.py unionize base var fields types (#4153) 2024-10-11 17:27:15 -07:00