Skip to content

Commit

Permalink
fix strict equality tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmorshea committed Dec 9, 2023
1 parent bd5bb0c commit 5efe2f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/py/reactpy/tests/test_core/test_hooks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from asyncio import CancelledError, create_task, sleep, wait_for
from asyncio import CancelledError, TimeoutError, create_task, sleep, wait_for
from asyncio import Event as EventNoTimeout

import pytest
Expand Down Expand Up @@ -1213,7 +1213,7 @@ def SomeComponent():
@pytest.mark.parametrize("get_value", STRICT_EQUALITY_VALUE_CONSTRUCTORS)
async def test_use_effect_compares_with_strict_equality(get_value):
effect_count = reactpy.Ref(0)
value = reactpy.Ref("string")
value = reactpy.Ref(get_value())
hook = HookCatcher()

@reactpy.component
Expand All @@ -1226,7 +1226,7 @@ def incr_effect_count():
async with reactpy.Layout(SomeComponent()) as layout:
await layout.render()
assert effect_count.current == 1
value.current = "string" # new string instance but same value
value.current = get_value()
hook.latest.schedule_render()
await layout.render()
# effect does not trigger
Expand Down

0 comments on commit 5efe2f6

Please sign in to comment.