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

Function test_potentially_dirty_states

tests/units/test_state.py:3694–3712  ·  view source on GitHub ↗

Test that potentially_dirty_substates returns the correct substates. Even if the name "State" is shadowed, it should still work correctly.

()

Source from the content-addressed store, hash-verified

3692
3693
3694def test_potentially_dirty_states():
3695 """Test that potentially_dirty_substates returns the correct substates.
3696
3697 Even if the name "State" is shadowed, it should still work correctly.
3698 """
3699
3700 class State(RxState):
3701 @computed_var
3702 def foo(self) -> str:
3703 return ""
3704
3705 class C1(State):
3706 @computed_var
3707 def bar(self) -> str:
3708 return ""
3709
3710 assert RxState._get_potentially_dirty_states() == set()
3711 assert State._get_potentially_dirty_states() == set()
3712 assert C1._get_potentially_dirty_states() == set()
3713
3714
3715@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected