Test that potentially_dirty_substates returns the correct substates. Even if the name "State" is shadowed, it should still work correctly.
()
| 3692 | |
| 3693 | |
| 3694 | def 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 |
nothing calls this directly
no test coverage detected