()
| 13 | |
| 14 | |
| 15 | def test_basic_ref_behavior(): |
| 16 | r = reactpy.Ref(1) |
| 17 | assert r.current == 1 |
| 18 | |
| 19 | r.current = 2 |
| 20 | assert r.current == 2 |
| 21 | |
| 22 | assert r.set_current(3) == 2 |
| 23 | assert r.current == 3 |
| 24 | |
| 25 | r = reactpy.Ref() |
| 26 | with pytest.raises(AttributeError): |
| 27 | r.current # noqa: B018 |
| 28 | |
| 29 | r.current = 4 |
| 30 | assert r.current == 4 |
| 31 | |
| 32 | |
| 33 | def test_ref_equivalence(): |
nothing calls this directly
no test coverage detected